mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-23 01:14:31 +02:00
Tracer mechanism for showing underlying SQL queries
* Pass a tracer= function to Database constructor * New db.tracer() contextmanager * Neater SQL indentation, because tracer means it could be visible now * New db.execute() and db.executescript() methods Closes #150
This commit is contained in:
parent
3e87500e15
commit
cf2cb244fa
12 changed files with 231 additions and 79 deletions
|
|
@ -396,7 +396,7 @@ def test_enable_fts_with_triggers(db_path):
|
|||
def search(q):
|
||||
return (
|
||||
Database(db_path)
|
||||
.conn.execute("select c1 from Gosh_fts where c1 match ?", [q])
|
||||
.execute("select c1 from Gosh_fts where c1 match ?", [q])
|
||||
.fetchall()
|
||||
)
|
||||
|
||||
|
|
@ -417,7 +417,7 @@ def test_populate_fts(db_path):
|
|||
def search(q):
|
||||
return (
|
||||
Database(db_path)
|
||||
.conn.execute("select c1 from Gosh_fts where c1 match ?", [q])
|
||||
.execute("select c1 from Gosh_fts where c1 match ?", [q])
|
||||
.fetchall()
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue