table.count_where() method, closes #305

This commit is contained in:
Simon Willison 2021-08-01 22:05:03 -07:00
commit 4823aff4c3
4 changed files with 45 additions and 10 deletions

View file

@ -132,7 +132,7 @@ def test_uses_counts_after_enable_counts(counts_db_path):
assert db["foo"].count == 1
assert logged == [
("select name from sqlite_master where type = 'view'", None),
("select count(*) from [foo]", None),
("select count(*) from [foo]", []),
]
logged.clear()
assert not db.use_counts_table