mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-23 09:24:31 +02:00
table.triggers_dict property, closes #211
This commit is contained in:
parent
0dca784dbe
commit
b067f1ff57
3 changed files with 22 additions and 1 deletions
|
|
@ -1458,6 +1458,15 @@ The ``.triggers`` property lists database triggers. It can be used on both datab
|
|||
>>> db.triggers
|
||||
... similar output to db["authors"].triggers
|
||||
|
||||
The ``table.triggers_dict`` property returns the triggers for that table as a dictionary mapping their names to their SQL definitions.
|
||||
|
||||
::
|
||||
|
||||
>>> db["authors"].triggers_dict
|
||||
{'authors_ai': 'CREATE TRIGGER [authors_ai] AFTER INSERT...',
|
||||
'authors_ad': 'CREATE TRIGGER [authors_ad] AFTER DELETE...',
|
||||
'authors_au': 'CREATE TRIGGER [authors_au] AFTER UPDATE'}
|
||||
|
||||
The ``detect_fts()`` method returns the associated SQLite FTS table name, if one exists for this table. If the table has not been configured for full-text search it returns ``None``.
|
||||
|
||||
::
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue