xref: /netbsd-src/external/public-domain/sqlite/man/sqlite3_wal_checkpoint.3 (revision b9988867a8ad969c45a52aa7628bc932ec98d46b)
1.Dd January 24, 2024
2.Dt SQLITE3_WAL_CHECKPOINT 3
3.Os
4.Sh NAME
5.Nm sqlite3_wal_checkpoint
6.Nd checkpoint a database
7.Sh SYNOPSIS
8.In sqlite3.h
9.Ft int
10.Fo sqlite3_wal_checkpoint
11.Fa "sqlite3 *db"
12.Fa "const char *zDb"
13.Fc
14.Sh DESCRIPTION
15The sqlite3_wal_checkpoint(D,X) is equivalent to sqlite3_wal_checkpoint_v2(D,X,SQLITE_CHECKPOINT_PASSIVE,0,0).
16.Pp
17In brief, sqlite3_wal_checkpoint(D,X) causes the content in the write-ahead log
18for database X on database connection D to be transferred
19into the database file and for the write-ahead log to be reset.
20See the checkpointing documentation for addition information.
21.Pp
22This interface used to be the only way to cause a checkpoint to occur.
23But then the newer and more powerful
24.Fn sqlite3_wal_checkpoint_v2
25interface was added.
26This interface is retained for backwards compatibility and as a convenience
27for applications that need to manually start a callback but which do
28not need the full power (and corresponding complication) of
29.Fn sqlite3_wal_checkpoint_v2 .
30.Sh IMPLEMENTATION NOTES
31These declarations were extracted from the
32interface documentation at line 9584.
33.Bd -literal
34SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb);
35.Ed
36.Sh SEE ALSO
37.Xr sqlite3 3 ,
38.Xr sqlite3_wal_checkpoint_v2 3 ,
39.Xr SQLITE_CHECKPOINT_PASSIVE 3
40