New submission from Erlend E. Aasland <erlend.aasl...@innova.no>:

For SQLite 3.14.0 and newer, we're using the v2 trace API. This means that the 
trace callback receives a pointer to the sqlite3_stmt object. We can use the 
sqlite3_stmt pointer to retrieve expanded SQL string.

The following statement...:
cur.executemany("insert into t values(?)", ((v,) for v in range(3)))

...will produce the following traces:
  insert into t values(0)
  insert into t values(1)
  insert into t values(2)

...instead of:
  insert into t values(?)
  insert into t values(?)
  insert into t values(?)

----------
assignee: erlendaasland
components: Extension Modules
messages: 401383
nosy: erlendaasland
priority: low
severity: normal
status: open
title: [sqlite3] expand bound values in traced statements if possible
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue45138>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to