Sqlean-py

Latest version: v0.1

Safety actively analyzes 626643 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 8

0.21.0

This release brings a single-file bundle containing all extensions from the main set:

- `sqlean.so` for Linux
- `sqlean.dll` for Windows
- `sqlean.dylib` for macOS

The bundle loads like other extensions, e.g:


sqlite> .load ./sqlean
sqlite> select median(value) from generate_series(1, 99);


When loaded, it activates functions from all existing extensions (except `ipaddr`, which does not work on Windows).

0.20.0

This release brings the new [text](https://github.com/nalgeon/sqlean/blob/main/docs/text.md) extension — a rich set of string functions, from `slice`, `contains` and `count` to `split_part`, `trim` and `repeat`.

Provides 25 functions, many of which are postgres-compatible.

Substrings and slicing:


text_substring(str, start [,length])
text_slice(str, start [,end])
text_left(str, length)
text_right(str, length)


Search and match:


text_index(str, other)
text_last_index(str, other)
text_contains(str, other)
text_has_prefix(str, other)
text_has_suffix(str, other)
text_count(str, other)


Split and join:


text_split(str, sep, n)
text_concat(str, ...)
text_join(sep, str, ...)
text_repeat(str, count)


Trim and pad:


text_ltrim(str [,chars])
text_rtrim(str [,chars])
text_trim(str [,chars])
text_lpad(str, length [,fill])
text_rpad(str, length [,fill])


Other modifications:


text_replace(str, old, new [,count])
text_translate(str, from, to)
text_reverse(str)


String properties:


text_length(str)
text_size(str)
text_bitsize(str)

0.19.5

Even more encode/decode algorithms in the [crypto](https://github.com/nalgeon/sqlean/blob/main/docs/crypto.md) extension.

[Base85](https://en.wikipedia.org/wiki/Ascii85) (aka Ascii85):

sql
select encode('hello', 'base85');
-- BOu!rDZ
select decode('BOu!rDZ', 'base85');
-- hello


[Hexadecimal](https://en.wikipedia.org/wiki/Hexadecimal):

sql
select encode('hello', 'hex');
-- 68656c6c6f
select decode('68656c6c6f', 'hex');
-- hello


[URL encoding](https://en.wikipedia.org/wiki/URL_encoding):

sql
select encode('/hello?text=(ಠ_ಠ)', 'url');
-- %2Fhello%3Ft%3D%28%E0%B2%A0_%E0%B2%A0%29
select decode('%2Fhello%3Ft%3D%28%E0%B2%A0_%E0%B2%A0%29', 'url');
-- /hello?t=(ಠ_ಠ)

0.19.4

Encode/decode functions in the [crypto](https://github.com/nalgeon/sqlean/blob/main/docs/crypto.md) extension (similar to the ones in [postgres](https://www.postgresql.org/docs/current/functions-binarystring.html#FUNCTION-ENCODE)).

[Base32](https://en.wikipedia.org/wiki/Base32):

sql
select encode('hello', 'base32');
-- NBSWY3DP
select decode('NBSWY3DP', 'base32');
-- hello


[Base64](https://en.wikipedia.org/wiki/Base64):

sql
select encode('hello', 'base64');
-- aGVsbG8=
select decode('aGVsbG8=', 'base64');
-- hello

0.19.3

New functions:

- `regexp_capture(source, pattern [, n])` extracts a captured group from the source string ([regexp](https://github.com/nalgeon/sqlean/blob/main/docs/regexp.md) extension).
- `sqlean_version()` returns the current version (all extensions).

0.19.2

Changes in the [fileio](https://github.com/nalgeon/sqlean/blob/main/docs/fileio.md) extension:

- `fileio_append(path, str)` appends a string to a file.
- `fileio_read(path, offset, limit)` reads a file fragment.

Thanks to phrrngtn for `fileio_read` improvements! (68)

Page 1 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.