This release introduces a new sqlite-utils search
command for searching tables, see Executing searches. (#192)
The table.search()
method has been redesigned, see Searching with table.search(). (#197)
The release includes minor backwards-incompatible changes, hence the version bump to 3.0. Those changes, which should not affect most users, are:
- The
-c
shortcut option for outputting CSV is no longer available. The full--csv
option is required instead. - The
-f
shortcut for--fmt
has also been removed - use--fmt
. - The
table.search()
method now defaults to sorting by relevance, not sorting byrowid
. (#198) - The
table.search()
method now returns a generator over a list of Python dictionaries. It previously returned a list of tuples.
Also in this release:
- The
query
,tables
,rows
andsearch
CLI commands now accept a new--tsv
option which outputs the results in TSV. (#193) - A new
table.virtual_table_using
property reveals if a table is a virtual table, and returns the upper case type of virtual table (e.g.FTS4
orFTS5
) if it is. It returnsNone
if the table is not a virtual table. (#196) - The new
table.search_sql()
method returns the SQL for searching a table, see Building SQL queries with table.search_sql(). sqlite-utils rows
now accepts multiple optional-c
parameters specifying the columns to return. (#200)