{"html_url": "https://github.com/simonw/sqlite-utils/issues/219#issuecomment-753671902", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/219", "id": 753671902, "node_id": "MDEyOklzc3VlQ29tbWVudDc1MzY3MTkwMg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-01-03T20:31:04Z", "updated_at": "2021-01-03T20:32:13Z", "author_association": "OWNER", "body": "A `table.has_count_triggers` property.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 777707544, "label": "reset_counts() method and command"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/219#issuecomment-753671235", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/219", "id": 753671235, "node_id": "MDEyOklzc3VlQ29tbWVudDc1MzY3MTIzNQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-01-03T20:25:10Z", "updated_at": "2021-01-03T20:25:10Z", "author_association": "OWNER", "body": "To detect tables, look at the names of the triggers - `{table}{counts_table}_insert` and `{table}{counts_table}_delete`.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 777707544, "label": "reset_counts() method and command"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/219#issuecomment-753671009", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/219", "id": 753671009, "node_id": "MDEyOklzc3VlQ29tbWVudDc1MzY3MTAwOQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-01-03T20:22:53Z", "updated_at": "2021-01-03T20:22:53Z", "author_association": "OWNER", "body": "I think this should be accompanied by a `sqlite-utils reset-counts` command.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 777707544, "label": "reset_counts() method and command"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/219#issuecomment-753670833", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/219", "id": 753670833, "node_id": "MDEyOklzc3VlQ29tbWVudDc1MzY3MDgzMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-01-03T20:20:54Z", "updated_at": "2021-01-03T20:20:54Z", "author_association": "OWNER", "body": "This is a little tricky. We should assume that the existing values in the `_counts` table cannot be trusted at all when this method is called - so we should probably clear that table entirely and then re-populate it.\r\n\r\nBut that means we need to figure out which tables in the database have the counts triggers defined.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 777707544, "label": "reset_counts() method and command"}, "performed_via_github_app": null}