mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-25 18:34:32 +02:00
--convert function can now modify row in place, closes #371
This commit is contained in:
parent
b8c134059e
commit
22c8d10dd3
5 changed files with 49 additions and 38 deletions
|
|
@ -959,9 +959,7 @@ Given a JSON file called ``dogs.json`` containing this:
|
|||
|
||||
The following command will insert that data and add an ``is_good`` column set to ``1`` for each dog::
|
||||
|
||||
$ sqlite-utils insert dogs.db dogs dogs.json --convert '
|
||||
row["is_good"] = 1
|
||||
return row'
|
||||
$ sqlite-utils insert dogs.db dogs dogs.json --convert 'row["is_good"] = 1`
|
||||
|
||||
The ``--convert`` option also works with the ``--csv``, ``--tsv`` and ``--nl`` insert options.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue