Python CLI utility and library for manipulating SQLite databases
APACHE-2.0 License
Bot releases are visible (Hide)
Published by simonw about 4 years ago
db.enable_wal()
and db.disable_wal()
methods for enabling and disabling Write-Ahead Logging for a database file - see WAL mode in the Python API documentation.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). (#132)Published by simonw about 4 years ago
Published by simonw about 4 years ago
cat dog.jpg | sqlite-utils insert-files dogs.db pics - --name=dog.jpg
. (#127)tokenize=
parameter to enable_fts(). This means you can enable Porter stemming on a table by running db["articles"].enable_fts(["headline", "body"], tokenize="porter")
. (#130)--tokenize
option.Published by simonw about 4 years ago
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)Published by simonw about 4 years ago
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 to sqlite-utils query
- for outputting just a single raw column value - see Returning raw data from a query, such as binary content. (#123)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)Published by simonw over 4 years ago
table.pks
introspection property. #116Published by simonw over 4 years ago
sqlite-utils
command now supports UPDATE/INSERT/DELETE in addition to SELECT. #115Published by simonw over 4 years ago
Published by simonw over 4 years ago
sqlite-utils drop-table
command, see Dropping tables. (#111)sqlite-utils drop-view
command, see Dropping views.decimal.Decimal
objects are now stored as FLOAT
. (#110)Published by simonw over 4 years ago
sqlite-utils create-table
command, see Creating tables. (#27)sqlite-utils create-view
command, see Creating views. (#107)Published by simonw over 4 years ago
db.create_view(...)
now has additional parameters ignore=True
or replace=True
, see Creating views. (#106)Published by simonw over 4 years ago
sqlite-utils views my.db
command for listing views in a database, see Listing views. (#105)sqlite-utils tables
(and views
) has a new --schema
option which outputs the table/view schema, see Listing tables. (#104)repr()
instead of throwing an error. (#102)Published by simonw over 4 years ago
columns=
argument for the .insert()
, .insert_all()
, .upsert()
and .upsert_all()
methods, for over-riding the auto-detected types for columns and specifying additional columns that should be added when the table is created. See Custom column order and column types. (#100)Published by simonw over 4 years ago
table.rows_where(..., order_by="age desc")
argument, see Listing rows. (#76)Published by simonw over 4 years ago
table.last_pk
is now only available for inserts or upserts of a single record. (#98)Database(filepath, recreate=True)
parameter for deleting and recreating the database. (#97)Published by simonw over 4 years ago
Published by simonw over 4 years ago