mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-24 09:54:31 +02:00
table.has_counts_triggers property, refs #219
This commit is contained in:
parent
c265541384
commit
b4f09146d3
4 changed files with 46 additions and 4 deletions
|
|
@ -1268,6 +1268,16 @@ class Table(Queryable):
|
|||
self.db.conn.executescript(sql)
|
||||
self.db.use_counts_table = True
|
||||
|
||||
@property
|
||||
def has_counts_triggers(self):
|
||||
trigger_names = {
|
||||
"{table}{counts_table}_{suffix}".format(
|
||||
counts_table=self.db._counts_table_name, table=self.name, suffix=suffix
|
||||
)
|
||||
for suffix in ["insert", "delete"]
|
||||
}
|
||||
return trigger_names.issubset(self.triggers_dict.keys())
|
||||
|
||||
def enable_fts(
|
||||
self,
|
||||
columns,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue