mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-23 01:14:31 +02:00
database.triggers_dict, closes #216
This commit is contained in:
parent
3d041d34d5
commit
de08096989
3 changed files with 23 additions and 6 deletions
|
|
@ -272,6 +272,11 @@ class Database:
|
|||
).fetchall()
|
||||
]
|
||||
|
||||
@property
|
||||
def triggers_dict(self):
|
||||
"Returns {trigger_name: sql} dictionary"
|
||||
return {trigger.name: trigger.sql for trigger in self.triggers}
|
||||
|
||||
@property
|
||||
def journal_mode(self):
|
||||
return self.execute("PRAGMA journal_mode;").fetchone()[0]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue