summaryrefslogtreecommitdiffstats
path: root/Doc/library/sqlite3.rst
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-04-03 22:12:04 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-04-03 22:12:04 (GMT)
commit5bfa0622ec43c8e46ecde63cf9ed627952a0c398 (patch)
treed1db09f7c0fa6c328ab5405eb9445b9f2acb27ee /Doc/library/sqlite3.rst
parentd7edf3b82de5d8491f830aa576d7103fd818c3fd (diff)
downloadcpython-5bfa0622ec43c8e46ecde63cf9ed627952a0c398.zip
cpython-5bfa0622ec43c8e46ecde63cf9ed627952a0c398.tar.gz
cpython-5bfa0622ec43c8e46ecde63cf9ed627952a0c398.tar.bz2
Issue #11688: Add sqlite3.Connection.set_trace_callback(). Patch by Torsten Landschoff.
Diffstat (limited to 'Doc/library/sqlite3.rst')
-rw-r--r--Doc/library/sqlite3.rst16
1 files changed, 16 insertions, 0 deletions
diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst
index 7367674..01c306c 100644
--- a/Doc/library/sqlite3.rst
+++ b/Doc/library/sqlite3.rst
@@ -369,6 +369,22 @@ Connection Objects
method with :const:`None` for *handler*.
+.. method:: Connection.set_trace_callback(trace_callback)
+
+ Registers *trace_callback* to be called for each SQL statement that is
+ actually executed by the SQLite backend.
+
+ The only argument passed to the callback is the statement (as string) that
+ is being executed. The return value of the callback is ignored. Note that
+ the backend does not only run statements passed to the :meth:`Cursor.execute`
+ methods. Other sources include the transaction management of the Python
+ module and the execution of triggers defined in the current database.
+
+ Passing :const:`None` as *trace_callback* will disable the trace callback.
+
+ .. versionadded:: 3.3
+
+
.. method:: Connection.enable_load_extension(enabled)
This routine allows/disallows the SQLite engine to load SQLite extensions