Name
sqlite3_progress_handler() — Register a progress handler
Definition
void sqlite3_progress_handler( sqlite3* db, int num_ops, progress_handler, void* udp ); int progress_handler( void* udp );
-
db
A database connection.
-
num_ops
The number of byte-code operations the database engine should perform between calls to the progress handler. This is an approximation.
-
progress_handler
An application-defined progress handler callback function.
-
udp
An application-defined user-data pointer. This value is made available to the progress handler.
- Returns (
progress_handler()
) If the handler returns a nonzero value, the current database operations are interrupted.
Description
This function allows an application to register a progress
handler callback. Any time the database connection is in use,
the progress handler will be called. The frequency is controlled
by the num_ops
parameter,
which is the approximate number of virtual database engine
byte-code operations that will be performed between each
call.
This function only provides a periodic callback. It cannot be used to estimate the percentage of completion.
See Also
Get Using SQLite now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.