mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-24 18:04:32 +02:00
CLI now supports upsert/insert - closes #115
This commit is contained in:
parent
8eaac7c5f1
commit
03ee97d225
3 changed files with 32 additions and 3 deletions
|
|
@ -55,6 +55,11 @@ If you want to pretty-print the output further, you can pipe it through ``python
|
|||
}
|
||||
]
|
||||
|
||||
If you execute an `UPDATE` or `INSERT` query the comand will return the number of affected rows::
|
||||
|
||||
$ sqlite-utils dogs.db "update dogs set age = 5 where name = 'Cleo'"
|
||||
[{"rows_affected": 1}]
|
||||
|
||||
You can run queries against a temporary in-memory database by passing ``:memory:`` as the filename::
|
||||
|
||||
$ sqlite-utils :memory: "select sqlite_version()"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue