Skip to content

3.34

Compare
Choose a tag to compare
@simonw simonw released this 22 Jul 23:30
· 68 commits to main since this release

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-directory option for installing editable code. This option is useful during the development of a plugin. (#570)
  • table.create(...) method now accepts replace=True to drop and replace an existing table with the same name, or ignore=True to silently do nothing if a table already exists with the same name. (#568)
  • sqlite-utils insert ... --stop-after 10 option for stopping the insert after a specified number of records. Works for the upsert command as well. (#561)
  • The --csv and --tsv modes for insert now accept a --empty-null option, which cases empty strings in the CSV file to be stored as null in 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_name command for renaming tables. (#565)
  • The table.transform(...) method now takes an optional keep_table=new_table_name parameter, which will cause the original table to be renamed to new_table_name rather 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)