libsql_ prefix.
libsql_wal_frame_count
Returns the current number of frames in the WAL file.
A valid, open database connection. Must not be
NULL.Output pointer. On success, set to the number of frames currently in the WAL file.
Return values
| Code | Meaning |
|---|---|
SQLITE_OK | The frame count was written to *p_frame_count. |
SQLITE_MISUSE | db is NULL. |
SQLITE_ERROR | An error occurred while reading the WAL. |
Example
Safety requirements
dbmust be a valid pointer to an opensqlite3connection. Passing an invalid or freed pointer is undefined behavior.p_frame_countmust be a valid pointer to auint32_t. The value is only written whenSQLITE_OKis returned.- The database must be running in WAL journal mode. Use
PRAGMA journal_mode = walto enable WAL mode before calling this function.