{"html_url": "https://github.com/simonw/sqlite-utils/issues/159#issuecomment-693199049", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/159", "id": 693199049, "node_id": "MDEyOklzc3VlQ29tbWVudDY5MzE5OTA0OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-09-16T06:20:26Z", "updated_at": "2020-09-16T06:20:26Z", "author_association": "OWNER", "body": "See #121 - I need to think harder about how this all interacts with transactions.\r\n\r\nYou can do this:\r\n\r\n```python\r\nwith db.conn:\r\n db[\"mytable\"].delete_where()\r\n```\r\nBut that should be documented and maybe rethought.", "reactions": "{\"total_count\": 1, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 702386948, "label": ".delete_where() does not auto-commit (unlike .insert() or .upsert())"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/pull/158#issuecomment-693199392", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/158", "id": 693199392, "node_id": "MDEyOklzc3VlQ29tbWVudDY5MzE5OTM5Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-09-16T06:21:29Z", "updated_at": "2020-09-16T06:21:29Z", "author_association": "OWNER", "body": "Thanks!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 697203800, "label": "Fix accidental mega long line in docs"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/159#issuecomment-693486183", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/159", "id": 693486183, "node_id": "MDEyOklzc3VlQ29tbWVudDY5MzQ4NjE4Mw==", "user": {"value": 11712349, "label": "spdkils"}, "created_at": "2020-09-16T15:34:13Z", "updated_at": "2020-09-16T15:34:13Z", "author_association": "NONE", "body": "I appreciate the response, it's just unexpected.\r\n\r\nIf I insert, it commits, if I update it commits, if I upsert it commits... if I delete.. it doesn't???\r\nConfused me...\r\n\r\nI did just db commit it... But it's confusing.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 702386948, "label": ".delete_where() does not auto-commit (unlike .insert() or .upsert())"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/159#issuecomment-693589321", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/159", "id": 693589321, "node_id": "MDEyOklzc3VlQ29tbWVudDY5MzU4OTMyMQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-09-16T18:41:42Z", "updated_at": "2020-09-16T18:41:42Z", "author_association": "OWNER", "body": "Yeah I'm going to class this as a bug - that's definitely confusing.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 702386948, "label": ".delete_where() does not auto-commit (unlike .insert() or .upsert())"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/159#issuecomment-693694343", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/159", "id": 693694343, "node_id": "MDEyOklzc3VlQ29tbWVudDY5MzY5NDM0Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-09-16T22:15:39Z", "updated_at": "2020-09-16T22:15:39Z", "author_association": "OWNER", "body": "Independent of the transaction changes in #121 I may be able to check `self.conn.in_transaction` to see if a transaction is active and, if one is NOT active, execute the delete inside of one. https://docs.python.org/3/library/sqlite3.html#sqlite3.Connection.in_transaction", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 702386948, "label": ".delete_where() does not auto-commit (unlike .insert() or .upsert())"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/159#issuecomment-693694968", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/159", "id": 693694968, "node_id": "MDEyOklzc3VlQ29tbWVudDY5MzY5NDk2OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-09-16T22:17:19Z", "updated_at": "2020-09-16T22:17:19Z", "author_association": "OWNER", "body": "That's strange... this test here doesn't manually commit a transaction and passes:\r\n\r\nhttps://github.com/simonw/sqlite-utils/blob/7805d53bcf11199bd1f2b07e05ae90151f9d0eb0/tests/test_delete.py#L17-L23", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 702386948, "label": ".delete_where() does not auto-commit (unlike .insert() or .upsert())"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/159#issuecomment-693695177", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/159", "id": 693695177, "node_id": "MDEyOklzc3VlQ29tbWVudDY5MzY5NTE3Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-09-16T22:17:53Z", "updated_at": "2020-09-16T22:17:53Z", "author_association": "OWNER", "body": "@spdkils can you share a minimal code example that exhibits the behavior you're seeing?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 702386948, "label": ".delete_where() does not auto-commit (unlike .insert() or .upsert())"}, "performed_via_github_app": null}