mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-09-07 17:14:09 +02:00
Add --extract option to insert/upsert commands
Wires the extracts= Python API feature through the CLI so imports can create lookup tables in one step: --extract species for a table named after the column, or --extract species:Species for a custom name. Closes #352
This commit is contained in:
parent
f34dfb25da
commit
d4d075c924
5 changed files with 111 additions and 0 deletions
|
|
@ -1409,6 +1409,8 @@ To extract the ``species`` column out to a separate ``Species`` table, you can d
|
|||
|
||||
``None`` values are not extracted: no record is created for them in the lookup table and the column value stays ``null``.
|
||||
|
||||
The ``sqlite-utils insert`` and ``sqlite-utils upsert`` commands expose this as the ``--extract`` option, see :ref:`cli_insert_extract`.
|
||||
|
||||
.. _python_api_m2m:
|
||||
|
||||
Working with many-to-many relationships
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue