Sqlite-utils

Latest version: v3.36

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

Scan your dependencies

Page 7 of 19

3.9

- New `sqlite-utils schema` command showing the full SQL schema for a database, see [Showing the schema (CLI)](https://sqlite-utils.datasette.io/en/stable/cli.html#cli-schema). ([268](https://github.com/simonw/sqlite-utils/issues/268))
- `db.schema` introspection property exposing the same feature to the Python library, see [Showing the schema (Python library)](https://sqlite-utils.datasette.io/en/stable/python-api.html#python-api-schema).

3.8

- New `sqlite-utils indexes` command to list indexes in a database, see [Listing indexes](https://sqlite-utils.datasette.io/en/stable/cli.html#cli-indexes). ([263](https://github.com/simonw/sqlite-utils/issues/263))
- `table.xindexes` introspection property returning more details about that table's indexes, see [.xindexes](https://sqlite-utils.datasette.io/en/stable/python-api.html#python-api-introspection-xindexes). ([261](https://github.com/simonw/sqlite-utils/issues/261))

3.7

- New `table.pks_and_rows_where()` method returning `(primary_key, row_dictionary)` tuples - see [Listing rows with their primary keys](https://sqlite-utils.datasette.io/en/stable/python-api.html#python-api-pks-and-rows-where). ([240](https://github.com/simonw/sqlite-utils/issues/240))
- Fixed bug with *table.add_foreign_key()* against columns containing spaces. ([238](https://github.com/simonw/sqlite-utils/issues/238))
- `table_or_view.drop(ignore=True)` option for avoiding errors if the table or view does not exist. ([237](https://github.com/simonw/sqlite-utils/issues/237))
- `sqlite-utils drop-view --ignore` and `sqlite-utils drop-table --ignore` options. ([237](https://github.com/simonw/sqlite-utils/issues/237))
- Fixed a bug with inserts of nested JSON containing non-ascii strings - thanks, Dylan Wu. ([257](https://github.com/simonw/sqlite-utils/issues/257))
- Suggest `--alter` if an error occurs caused by a missing column. ([259](https://github.com/simonw/sqlite-utils/issues/259))
- Support creating indexes with columns in descending order, see [API documentation](https://sqlite-utils.datasette.io/en/stable/python-api.html#python-api-create-index) and [CLI documentation](https://sqlite-utils.datasette.io/en/stable/cli.html#cli-create-index). ([260](https://github.com/simonw/sqlite-utils/issues/260))
- Correctly handle CSV files that start with a UTF-8 BOM. ([250](https://github.com/simonw/sqlite-utils/issues/250))

3.6

This release adds the ability to execute queries joining data from more than one database file - similar to the cross database querying feature introduced in [Datasette 0.55](https://docs.datasette.io/en/stable/changelog.html#v0-55).

- The `db.attach(alias, filepath)` Python method can be used to attach extra databases to the same connection, see [db.attach() in the Python API documentation](https://sqlite-utils.datasette.io/en/stable/python-api.html#python-api-attach). ([113](https://github.com/simonw/sqlite-utils/issues/113))
- The `--attach` option attaches extra aliased databases to run SQL queries against directly on the command-line, see [attaching additional databases in the CLI documentation](https://sqlite-utils.datasette.io/en/stable/cli.html#cli-attach). ([236](https://github.com/simonw/sqlite-utils/issues/236))

3.5

- `sqlite-utils insert --sniff` option for detecting the delimiter and quote character used by a CSV file, see [Alternative delimiters and quote characters](https://sqlite-utils.datasette.io/en/stable/cli.html#cli-insert-csv-tsv-delimiter). ([230](https://github.com/simonw/sqlite-utils/issues/230))
- The `table.rows_where()`, `table.search()` and `table.search_sql()` methods all now take optional `offset=` and `limit=` arguments. ([231](https://github.com/simonw/sqlite-utils/issues/231))
- New `--no-headers` option for `sqlite-utils insert --csv` to handle CSV files that are missing the header row, see [CSV files without a header row](https://sqlite-utils.datasette.io/en/stable/cli.html#cli-insert-csv-tsv-no-header). ([228](https://github.com/simonw/sqlite-utils/issues/228))
- Fixed bug where inserting data with extra columns in subsequent chunks would throw an error. Thanks [nieuwenhoven](https://github.com/nieuwenhoven) for the fix. ([#234](https://github.com/simonw/sqlite-utils/issues/234))
- Fixed bug importing CSV files with columns containing more than 128KB of data. ([229](https://github.com/simonw/sqlite-utils/issues/229))
- Test suite now runs in CI against Ubuntu, macOS and Windows. Thanks [nieuwenhoven](https://github.com/nieuwenhoven) for the Windows test fixes. ([#232](https://github.com/simonw/sqlite-utils/issues/232))

3.4.1

- Fixed a code import bug that slipped in to 3.4. ([226](https://github.com/simonw/sqlite-utils/issues/226))

Page 7 of 19

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.