18
18
import textwrap
19
19
from typing import ( cast , Any , Callable , Dict , Generator , Iterable , Union , Optional , List , Tuple ,)
20
20
import uuid
21
- from sqlite_utils .plugins import pm
22
21
23
22
try : from sqlite_dump import iterdump
24
23
except ImportError : iterdump = None
@@ -233,7 +232,6 @@ def __init__(
233
232
recursive_triggers : bool = True ,
234
233
tracer : Optional [Callable ] = None ,
235
234
use_counts_table : bool = False ,
236
- execute_plugins : bool = True ,
237
235
strict : bool = False ,
238
236
):
239
237
assert (filename_or_conn is not None and (not memory and not memory_name )) or (
@@ -266,8 +264,6 @@ def __init__(
266
264
self .execute ("PRAGMA recursive_triggers=on;" )
267
265
self ._registered_functions : set = set ()
268
266
self .use_counts_table = use_counts_table
269
- if execute_plugins :
270
- pm .hook .prepare_connection (conn = self .conn )
271
267
self .strict = strict
272
268
273
269
def close (self ):
@@ -1146,8 +1142,8 @@ def init_spatialite(self, path: Optional[str] = None) -> bool:
1146
1142
1147
1143
.. code-block:: python
1148
1144
1149
- from sqlite_utils .db import Database
1150
- from sqlite_utils .utils import find_spatialite
1145
+ from fastlite .db import Database
1146
+ from fastlite .utils import find_spatialite
1151
1147
1152
1148
db = Database("mydb.db")
1153
1149
db.init_spatialite(find_spatialite())
@@ -1157,8 +1153,8 @@ def init_spatialite(self, path: Optional[str] = None) -> bool:
1157
1153
1158
1154
.. code-block:: python
1159
1155
1160
- from sqlite_utils .db import Database
1161
- from sqlite_utils .utils import find_spatialite
1156
+ from fastlite .db import Database
1157
+ from fastlite .utils import find_spatialite
1162
1158
1163
1159
db = Database("mydb.db")
1164
1160
db.init_spatialite("./local/mod_spatialite.dylib")
@@ -1424,7 +1420,7 @@ def get(self, pk_values: Union[list, tuple, str, int]) -> dict:
1424
1420
"""
1425
1421
Return row (as dictionary) for the specified primary key.
1426
1422
1427
- Raises ``sqlite_utils .db.NotFoundError`` if a matching row cannot be found.
1423
+ Raises ``fastlite .db.NotFoundError`` if a matching row cannot be found.
1428
1424
1429
1425
:param pk_values: A single value, or a tuple of values for tables that have a compound primary key
1430
1426
"""
@@ -3469,8 +3465,8 @@ def add_geometry_column(
3469
3465
3470
3466
.. code-block:: python
3471
3467
3472
- from sqlite_utils .db import Database
3473
- from sqlite_utils .utils import find_spatialite
3468
+ from fastlite .db import Database
3469
+ from fastlite .utils import find_spatialite
3474
3470
3475
3471
db = Database("mydb.db")
3476
3472
db.init_spatialite(find_spatialite())
0 commit comments