Name
sqlite3_trace() — Register an SQL statement trace callback [EXP]
Definition
void* sqlite3_trace( sqlite3* db, trace_callback, void* udp); void trace_callback( void* udp, const char* sql );
-
db A database connection.
-
trace_callback An application-defined trace callback function.
-
udp An application-defined user-data pointer. This value is made available to the trace function.
-
sql The text of the SQL statement that was executed, encoded in UTF-8.
- Returns (
sqlite3_trace()) The previous user-data pointer, if applicable.
Description
This function allows an application to register a trace function. The callback is called just before any SQL statement is processed. It may also be called when additional statements are processed, such as trigger bodies.
If the SQL text contains any statement parameters, these will be replaced with the actual values used for this execution.
See Also
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access