Sqlite-utils

Latest version: v3.36

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

Scan your dependencies

Page 11 of 19

2.15

- New `db.enable_wal()` and `db.disable_wal()` methods for enabling and disabling [Write-Ahead Logging](https://www.sqlite.org/wal.html) for a database file - see [WAL mode](https://sqlite-utils.readthedocs.io/en/stable//python-api.html#python-api-wal) in the Python API documentation.
- Also `sqlite-utils enable-wal file.db` and `sqlite-utils disable-wal file.db` commands for doing the same thing on the command-line, see [WAL mode (CLI)](https://sqlite-utils.readthedocs.io/en/stable/cli.html#cli-wal). ([132](https://github.com/simonw/sqlite-utils/issues/132))

2.14.1

- Documentation improvements

2.14

- The [insert-files command](https://sqlite-utils.readthedocs.io/en/stable/cli.html#cli-insert-files) can now read from standard input: `cat dog.jpg | sqlite-utils insert-files dogs.db pics - --name=dog.jpg`. ([127](https://github.com/simonw/sqlite-utils/issues/127))
- You can now specify a full-text search tokenizer using the new `tokenize=` parameter to [enable_fts()](https://sqlite-utils.readthedocs.io/en/stable/python-api.html#python-api-fts). This means you can enable Porter stemming on a table by running `db["articles"].enable_fts(["headline", "body"], tokenize="porter")`. ([130](https://github.com/simonw/sqlite-utils/issues/130))
- You can also set a custom tokenizer using the [sqlite-utils enable-fts](https://sqlite-utils.readthedocs.io/en/stable/cli.html#cli-fts) CLI command, via the new `--tokenize` option.

2.13

- `memoryview` and `uuid.UUID` objects are now supported. `memoryview` objects will be stored using `BLOB` and `uuid.UUID` objects will be stored using `TEXT`. (128)

2.12

The theme of this release is better tools for working with binary data. The new `insert-files` command can be used to insert binary files directly into a database table, and other commands have been improved with better support for BLOB columns.

- `sqlite-utils insert-files my.db gifs *.gif` can now insert the contents of files into a specified table. The columns in the table can be customized to include different pieces of metadata derived from the files. See [Inserting binary data from files](https://sqlite-utils.readthedocs.io/en/stable/cli.html#cli-insert-files). ([122](https://github.com/simonw/sqlite-utils/issues/122))
- `--raw` option to `sqlite-utils query` - for outputting just a single raw column value - see [Returning raw data from a query, such as binary content](https://sqlite-utils.readthedocs.io/en/stable/cli.html#cli-query-raw). ([123](https://github.com/simonw/sqlite-utils/issues/123))
- JSON output now encodes BLOB values as special base64 obects - see [Running queries and returning JSON](https://sqlite-utils.readthedocs.io/en/stable/cli.html#cli-query-json). ([125](https://github.com/simonw/sqlite-utils/issues/125))
- The same format of JSON base64 objects can now be used to insert binary data - see [Inserting JSON data](https://sqlite-utils.readthedocs.io/en/stable/cli.html#cli-inserting-data). ([126](https://github.com/simonw/sqlite-utils/issues/126))
- The `sqlite-utils query` command can now accept named parameters, e.g. `sqlite-utils :memory: "select :num * :num2" -p num 5 -p num2 6` - see [Running queries and returning JSON](https://sqlite-utils.readthedocs.io/en/stable/cli.html#cli-query-json). ([124](https://github.com/simonw/sqlite-utils/issues/124))

2.11

- New `--truncate` option to `sqlite-utils insert`, and `truncate=True` argument to `.insert_all()`. Thanks, Thomas Sibley. ([118](https://github.com/simonw/sqlite-utils/pull/118))
- The `sqlite-utils query` command now runs updates in a transaction. Thanks, Thomas Sibley. ([120](https://github.com/simonw/sqlite-utils/pull/120))

Page 11 of 19

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.