Navigation
API > API/Plugins > API/Plugins/SQLiteCore > API/Plugins/SQLiteCore/sqlite
References
| Module | SQLiteCore |
| Header | /Engine/Plugins/Runtime/Database/SQLiteCore/Source/SQLiteCore/Public/sqlite/sqlite3.h |
| Include | #include "sqlite/sqlite3.h" |
int sqlite3_wal_autocheckpoint
(
sqlite3 * db,
int N
)
Remarks
CAPI3REF: Configure an auto-checkpoint METHOD: sqlite3
^The [sqlite3_wal_autocheckpoint(D,N)] is a wrapper around [sqlite3_wal_hook()] that causes any database on [database connection] D to automatically [checkpoint] after committing a transaction if there are N or more frames in the [write-ahead log] file. ^Passing zero or a negative value as the nFrame parameter disables automatic checkpoints entirely.
^The callback registered by this function replaces any existing callback registered using [sqlite3_wal_hook()]. ^Likewise, registering a callback using [sqlite3_wal_hook()] disables the automatic checkpoint mechanism configured by this function.
^The [wal_autocheckpoint pragma] can be used to invoke this interface from SQL.
^Checkpoints initiated by this mechanism are [sqlite3_wal_checkpoint_v2|PASSIVE].
^Every new [database connection] defaults to having the auto-checkpoint enabled with a threshold of 1000 or [SQLITE_DEFAULT_WAL_AUTOCHECKPOINT] pages. The use of this interface is only necessary if the default setting is found to be suboptimal for a particular application.