Skip to content

Commit

Permalink
Docs for insert with multiple --pk, refs #621
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Mar 17, 2024
1 parent da92a30 commit 1feb0c4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1088,11 +1088,13 @@ You can import all three records into an automatically created ``dogs`` table an
sqlite-utils insert dogs.db dogs dogs.json --pk=id
Pass ``--pk`` multiple times to define a compound primary key.

You can skip inserting any records that have a primary key that already exists using ``--ignore``:

.. code-block:: bash
sqlite-utils insert dogs.db dogs dogs.json --ignore
sqlite-utils insert dogs.db dogs dogs.json --pk=id --ignore
You can delete all the existing rows in the table before inserting the new records using ``--truncate``:

Expand Down

0 comments on commit 1feb0c4

Please sign in to comment.