mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-23 09:24:31 +02:00
Allow sqlite-utils upsert to infer --pk from existing table
This commit is contained in:
parent
aa300942bf
commit
ebafb84c93
4 changed files with 30 additions and 6 deletions
|
|
@ -321,6 +321,8 @@ See :ref:`cli_upsert`.
|
|||
incoming record has a primary key that matches an existing record the existing
|
||||
record will be updated.
|
||||
|
||||
If the table already exists and has a primary key, --pk can be omitted.
|
||||
|
||||
Example:
|
||||
|
||||
echo '[
|
||||
|
|
@ -330,7 +332,6 @@ See :ref:`cli_upsert`.
|
|||
|
||||
Options:
|
||||
--pk TEXT Columns to use as the primary key, e.g. id
|
||||
[required]
|
||||
--flatten Flatten nested JSON objects, so {"a": {"b": 1}}
|
||||
becomes {"a_b": 1}
|
||||
--nl Expect newline-delimited JSON
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue