Skip to content

Commit

Permalink
rm plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
jph00 committed Jun 4, 2024
1 parent f1d02b6 commit 83489b4
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions fastlite/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import textwrap
from typing import ( cast, Any, Callable, Dict, Generator, Iterable, Union, Optional, List, Tuple,)
import uuid
from sqlite_utils.plugins import pm

try: from sqlite_dump import iterdump
except ImportError: iterdump = None
Expand Down Expand Up @@ -233,7 +232,6 @@ def __init__(
recursive_triggers: bool = True,
tracer: Optional[Callable] = None,
use_counts_table: bool = False,
execute_plugins: bool = True,
strict: bool = False,
):
assert (filename_or_conn is not None and (not memory and not memory_name)) or (
Expand Down Expand Up @@ -266,8 +264,6 @@ def __init__(
self.execute("PRAGMA recursive_triggers=on;")
self._registered_functions: set = set()
self.use_counts_table = use_counts_table
if execute_plugins:
pm.hook.prepare_connection(conn=self.conn)
self.strict = strict

def close(self):
Expand Down Expand Up @@ -1146,8 +1142,8 @@ def init_spatialite(self, path: Optional[str] = None) -> bool:
.. code-block:: python
from sqlite_utils.db import Database
from sqlite_utils.utils import find_spatialite
from fastlite.db import Database
from fastlite.utils import find_spatialite
db = Database("mydb.db")
db.init_spatialite(find_spatialite())
Expand All @@ -1157,8 +1153,8 @@ def init_spatialite(self, path: Optional[str] = None) -> bool:
.. code-block:: python
from sqlite_utils.db import Database
from sqlite_utils.utils import find_spatialite
from fastlite.db import Database
from fastlite.utils import find_spatialite
db = Database("mydb.db")
db.init_spatialite("./local/mod_spatialite.dylib")
Expand Down Expand Up @@ -1424,7 +1420,7 @@ def get(self, pk_values: Union[list, tuple, str, int]) -> dict:
"""
Return row (as dictionary) for the specified primary key.
Raises ``sqlite_utils.db.NotFoundError`` if a matching row cannot be found.
Raises ``fastlite.db.NotFoundError`` if a matching row cannot be found.
:param pk_values: A single value, or a tuple of values for tables that have a compound primary key
"""
Expand Down Expand Up @@ -3469,8 +3465,8 @@ def add_geometry_column(
.. code-block:: python
from sqlite_utils.db import Database
from sqlite_utils.utils import find_spatialite
from fastlite.db import Database
from fastlite.utils import find_spatialite
db = Database("mydb.db")
db.init_spatialite(find_spatialite())
Expand Down

0 comments on commit 83489b4

Please sign in to comment.