Skip to content

Commit 8964110

Browse files
Documented the use of delete_where (#630)
Documented the use of delete_where, as shown in #159
1 parent dc79454 commit 8964110

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/python-api.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,8 @@ You can delete all records in a table that match a specific WHERE statement usin
890890

891891
>>> db = sqlite_utils.Database("dogs.db")
892892
>>> # Delete every dog with age less than 3
893-
>>> db["dogs"].delete_where("age < ?", [3])
893+
>>> with db.conn:
894+
>>> db["dogs"].delete_where("age < ?", [3])
894895

895896
Calling ``table.delete_where()`` with no other arguments will delete every row in the table.
896897

0 commit comments

Comments
 (0)