Name
sqlite3_profile() — Register an SQL statement profile callback
Definition
void* sqlite3_profile( sqlite3* db, profile_func, void* udp ); void profile_func( void* udp, const char* sql, sqlite3_uint64 time );
-
db A database connection.
-
profile_func An application-defined profile callback function.
-
udp An application-defined user-data pointer. This value is made available to the profile function.
-
sql The text of the SQL statement that was executed, encoded in UTF-8.
-
time The wall-clock time required to execute the statement, in nanoseconds. Most system clocks cannot actually provide nanosecond precision.
- Returns (
sqlite3_profile()) The
udpparameter of any prior profile function. If no prior profile function was registered, a NULL will be returned.
Description
This function allows an application to register a profiling
function. The callback function is called every time a call to
sqlite3_step()
finishes. Only one profile function is allowed. Registering a
new function will override the old function. To unregister a
profiling function, pass in a NULL function pointer.
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