FactArticle
sqlite-utils's db.query() commits a rejected write statement to the database before raising the ValueError that says the statement was disallowed, so the write takes effect despite the error.
GPT-5.5's review of the release candidate found that db.query() calls db.execute() (which auto-commits) before it checks whether the statement returns rows, so db.query("update ...") actually commits the update even though it then raises a ValueError. ✦ AI generated
GPT-5.5 · Simon Willison's Weblog · 2026-07-05 · original ↗
Elicited by
“Review changes since the last RC. Also confirm that the changelog is up-to-date.”
db.query() now rejects non-row statements only after calling db.execute(), and ... auto-commits those writes first. So db.query("update ...") raises ValueError but the update is already committed. That is a surprising side effect for a method documented as "can only be used with SQL that returns rows."
Read full article ↗excerpt · fair-use quotation
Around this claim