mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-09-28 12:54:15 +02:00
Documented the use of delete_where
Documented the use of delete_where, as shown in https://github.com/simonw/sqlite-utils/issues/159
This commit is contained in:
parent
577078fe01
commit
5c8d504042
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")
|
>>> db = sqlite_utils.Database("dogs.db")
|
||||||
>>> # Delete every dog with age less than 3
|
>>> # 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.
|
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