mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-23 01:14:31 +02:00
Documented the use of delete_where (#630)
Documented the use of delete_where, as shown in https://github.com/simonw/sqlite-utils/issues/159
This commit is contained in:
parent
dc79454234
commit
896411099e
1 changed files with 2 additions and 1 deletions
|
|
@ -890,7 +890,8 @@ You can delete all records in a table that match a specific WHERE statement usin
|
|||
|
||||
>>> db = sqlite_utils.Database("dogs.db")
|
||||
>>> # Delete every dog with age less than 3
|
||||
>>> db["dogs"].delete_where("age < ?", [3])
|
||||
>>> with db.conn:
|
||||
>>> db["dogs"].delete_where("age < ?", [3])
|
||||
|
||||
Calling ``table.delete_where()`` with no other arguments will delete every row in the table.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue