xref: /netbsd-src/external/public-domain/sqlite/man/sqlite3_wal_checkpoint.3 (revision d16b7486a53dcb8072b60ec6fcb4373a2d0c27b7)
1.Dd December 19, 2018
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.Ft int
9.Fo sqlite3_wal_checkpoint
10.Fa "sqlite3 *db"
11.Fa "const char *zDb"
12.Fc
13.Sh DESCRIPTION
14The sqlite3_wal_checkpoint(D,X) is equivalent to sqlite3_wal_checkpoint_v2(D,X,SQLITE_CHECKPOINT_PASSIVE,0,0).
15.Pp
16In brief, sqlite3_wal_checkpoint(D,X) causes the content in the write-ahead log
17for database X on database connection D to be transferred
18into the database file and for the write-ahead log to be reset.
19See the checkpointing documentation for addition information.
20.Pp
21This interface used to be the only way to cause a checkpoint to occur.
22But then the newer and more powerful sqlite3_wal_checkpoint_v2()
23interface was added.
24This interface is retained for backwards compatibility and as a convenience
25for applications that need to manually start a callback but which do
26not need the full power (and corresponding complication) of sqlite3_wal_checkpoint_v2().
27.Sh SEE ALSO
28.Xr sqlite3 3 ,
29.Xr sqlite3_wal_checkpoint_v2 3 ,
30.Xr SQLITE_CHECKPOINT_PASSIVE 3
31