delete_where() now commits inside a transaction, refs #815

This commit is contained in:
Simon Willison 2026-07-25 17:22:17 -07:00
commit bf133b4825
2 changed files with 18 additions and 1 deletions

View file

@ -2773,7 +2773,8 @@ class Table(Queryable):
sql = "delete from [{}]".format(self.name)
if where is not None:
sql += " where " + where
self.db.execute(sql, where_args or [])
with self.db.conn:
self.db.execute(sql, where_args or [])
if analyze:
self.analyze()
return self