Python CLI utility and library for manipulating SQLite databases
APACHE-2.0 License
Bot releases are visible (Hide)
Published by simonw over 4 years ago
table.column_dicts
now works with all column types - previously it would throw errors on types other than TEXT
, BLOB
, INTEGER
or FLOAT
. (#92)NotFoundError
thrown by table.get(pk)
- see Retrieving a specific record.Published by simonw over 4 years ago
table.enable_fts()
now works with columns that contain spaces. (#90)Published by simonw over 4 years ago
table.disable_fts()
can now be used to remove FTS tables and triggers that were created using table.enable_fts(...)
. (#88)sqlite-utils disable-fts
command can be used to remove FTS tables and triggers from the command-line. (#88)dict
, list
and tuple
are now detected as needing a JSON column. (#87)Published by simonw over 4 years ago
table.create_index()
now works for columns that contain spaces. (#85)
Published by simonw over 4 years ago
table.exists()
is now a method, not a property. This was not a documented part of the API before so I’m considering this a non-breaking change. (#83)
Published by simonw over 4 years ago
Fixed a bug where .upsert(..., hash_id="pk")
threw an error (#84).
Published by simonw over 4 years ago
New feature: sqlite_utils.suggest_column_types([records])
returns the suggested column types for a list of records. See Suggesting column types. (#81).
This replaces the undocumented table.detect_column_types()
method.
Published by simonw over 4 years ago
New feature: conversions={...}
can be passed to the .insert()
family of functions to specify SQL conversions that should be applied to values that are being inserted or updated. See Converting column values using SQL functions. (#77).
Published by simonw almost 5 years ago
The .upsert()
and .upsert_all()
methods now raise a sqlite_utils.db.PrimaryKeyRequired
exception if you call them without specifying the primary key column using pk=
(#73).
Published by simonw almost 5 years ago
This release changes the behaviour of upsert
. It’s a breaking change, hence 2.0.
The upsert
command-line utility and the .upsert()
and .upsert_all()
Python API methods have had their behaviour altered. They used to completely replace the affected records: now, they update the specified values on existing records but leave other columns unaffected.
See Upserting data using the Python API and Upserting data using the CLI for full details.
If you want the old behaviour - where records were completely replaced - you can use $ sqlite-utils insert ... --replace
on the command-line and .insert(..., replace=True)
and .insert_all(..., replace=True)
in the Python API. See Insert-replacing data using the Python API and Insert-replacing data using the CLI for more.
For full background on this change, see issue #66.
Published by simonw almost 5 years ago
Published by simonw almost 5 years ago
Published by simonw about 5 years ago
Published by simonw about 5 years ago
Published by simonw about 5 years ago
Published by simonw about 5 years ago
Published by simonw about 5 years ago
Published by simonw about 5 years ago
Published by simonw over 5 years ago
sqlite-utils insert
can now accept TSV data via the new --tsv
option (#41)Published by simonw over 5 years ago