mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-28 03:44:31 +02:00
Database(..., execute_plugins=False) mechanism, refs #575
This commit is contained in:
parent
3f80a02698
commit
374a816c72
3 changed files with 24 additions and 15 deletions
|
|
@ -311,6 +311,7 @@ class Database:
|
|||
recursive_triggers: bool = True,
|
||||
tracer: Optional[Callable] = None,
|
||||
use_counts_table: bool = False,
|
||||
execute_plugins: bool = True,
|
||||
):
|
||||
assert (filename_or_conn is not None and (not memory and not memory_name)) or (
|
||||
filename_or_conn is None and (memory or memory_name)
|
||||
|
|
@ -342,8 +343,8 @@ class Database:
|
|||
self.execute("PRAGMA recursive_triggers=on;")
|
||||
self._registered_functions: set = set()
|
||||
self.use_counts_table = use_counts_table
|
||||
|
||||
pm.hook.prepare_connection(conn=self.conn)
|
||||
if execute_plugins:
|
||||
pm.hook.prepare_connection(conn=self.conn)
|
||||
|
||||
def close(self):
|
||||
"Close the SQLite connection, and the underlying database file"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue