This release introduces a new plugin system. (#567)
- Documentation describing how to build a plugin.
- Plugin hook: register_commands(cli), for plugins to add extra commands to
sqlite-utils. (#569) - Plugin hook: prepare_connection(conn). Plugins can use this to help prepare the SQLite connection to do things like registering custom SQL functions. Thanks, Alex Garcia. (#574)
sqlite_utils.Database(..., execute_plugins=False)option for disabling plugin execution. (#575)sqlite-utils install -e path-to-directoryoption for installing editable code. This option is useful during the development of a plugin. (#570)table.create(...)method now acceptsreplace=Trueto drop and replace an existing table with the same name, orignore=Trueto silently do nothing if a table already exists with the same name. (#568)sqlite-utils insert ... --stop-after 10option for stopping the insert after a specified number of records. Works for theupsertcommand as well. (#561)- The
--csvand--tsvmodes forinsertnow accept a--empty-nulloption, which cases empty strings in the CSV file to be stored asnullin the database. (#563) - New
db.rename_table(table_name, new_name)method for renaming tables. (#565) sqlite-utils rename-table my.db table_name new_namecommand for renaming tables. (#565)- The
table.transform(...)method now takes an optionalkeep_table=new_table_nameparameter, which will cause the original table to be renamed tonew_table_namerather than being dropped at the end of the transformation. (#571) - Documentation now notes that calling
table.transform()without any arguments will reformat the SQL schema stored by SQLite to be more aesthetically pleasing. (#564)