sqlite-utils insert --code option, closes #684

This commit is contained in:
Simon Willison 2026-07-07 18:48:57 -07:00
commit 569608e40f
5 changed files with 347 additions and 75 deletions

View file

@ -10,6 +10,7 @@ Unreleased
----------
- ``sqlite-utils query`` can now read the SQL query from standard input by passing ``-`` in place of the query, for example ``echo "select * from dogs" | sqlite-utils query dogs.db -``. (:issue:`765`)
- ``sqlite-utils insert`` and ``sqlite-utils upsert`` now accept a ``--code`` option for providing a block of Python code (or a path to a ``.py`` file) that defines a ``rows()`` function or ``rows`` iterable of rows to insert, as an alternative to importing from a file. (:issue:`684`)
.. _v4_0: