mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-09-25 11:24:12 +02:00
Documentation for tracer mechanism
This commit is contained in:
parent
31bea2ac61
commit
f12251092c
12 changed files with 68 additions and 22 deletions
|
|
@ -771,7 +771,7 @@ def query(
|
|||
for ext in load_extension:
|
||||
db.conn.load_extension(ext)
|
||||
with db.conn:
|
||||
cursor = db.conn.execute(sql, dict(param))
|
||||
cursor = db.execute(sql, dict(param))
|
||||
if cursor.description is None:
|
||||
# This was an update/insert
|
||||
headers = ["rows_affected"]
|
||||
|
|
|
|||
|
|
@ -124,9 +124,9 @@ class Database:
|
|||
else:
|
||||
assert not recreate, "recreate cannot be used with connections, only paths"
|
||||
self.conn = filename_or_conn
|
||||
if recursive_triggers:
|
||||
self.conn.execute("PRAGMA recursive_triggers=on;")
|
||||
self._tracer = tracer
|
||||
if recursive_triggers:
|
||||
self.execute("PRAGMA recursive_triggers=on;")
|
||||
|
||||
@contextlib.contextmanager
|
||||
def tracer(self, tracer=None):
|
||||
|
|
@ -940,7 +940,7 @@ class Table(Queryable):
|
|||
table=fts_table
|
||||
)
|
||||
)
|
||||
self.db.conn.execute(
|
||||
self.db.execute(
|
||||
textwrap.dedent(
|
||||
"""
|
||||
DELETE FROM [{table}_docsize] WHERE {column} NOT IN (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue