CLI now supports upsert/insert - closes #115

This commit is contained in:
Simon Willison 2020-06-12 10:40:53 -07:00
commit 03ee97d225
3 changed files with 32 additions and 3 deletions

View file

@ -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()"