Releases: simonw/sqlite-utils
Releases · simonw/sqlite-utils
2.17
This release handles a bug where replacing rows in FTS tables could result in growing numbers of unneccessary rows in the associated *_fts_docsize
table. (#149)
PRAGMA recursive_triggers=on
by default for all connections. You can turn it off withDatabase(recursive_triggers=False)
. (#152)table.optimize()
method now deletes unnecessary rows from the*_fts_docsize
table. (#153)- New tracer method for tracking underlying SQL queries, see Tracing queries. (#150)
- Neater indentation for schema SQL. (#148)
- Documentation for
sqlite_utils.AlterError
exception thrown by inadd_foreign_keys()
.
2.16.1
2.16
2.15.1
2.15
- New
db.enable_wal()
anddb.disable_wal()
methods for enabling and disabling Write-Ahead Logging for a database file - see WAL mode in the Python API documentation. - Also
sqlite-utils enable-wal file.db
andsqlite-utils disable-wal file.db
commands for doing the same thing on the command-line, see WAL mode (CLI). (#132)
2.14.1
2.14
- The insert-files command can now read from standard input:
cat dog.jpg | sqlite-utils insert-files dogs.db pics - --name=dog.jpg
. (#127) - You can now specify a full-text search tokenizer using the new
tokenize=
parameter to enable_fts(). This means you can enable Porter stemming on a table by runningdb["articles"].enable_fts(["headline", "body"], tokenize="porter")
. (#130) - You can also set a custom tokenizer using the sqlite-utils enable-fts CLI command, via the new
--tokenize
option.
2.13
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. (#122)--raw
option tosqlite-utils query
- for outputting just a single raw column value - see Returning raw data from a query, such as binary content. (#123)- JSON output now encodes BLOB values as special base64 obects - see Running queries and returning JSON. (#125)
- The same format of JSON base64 objects can now be used to insert binary data - see Inserting JSON data. (#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. (#124)