xref: /netbsd-src/external/public-domain/sqlite/man/sqlite3_wal_checkpoint.3 (revision a24efa7dea9f1f56c3bdb15a927d3516792ace1c)
1.Dd $Mdocdate$
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) interface
15causes database named X on database connection D
16to be checkpointed.
17If X is NULL or an empty string, then a checkpoint is run on all databases
18of connection D.
19If the database connection D is not in  write-ahead log mode
20then this interface is a harmless no-op.
21.Pp
22The wal_checkpoint pragma can be used to invoke
23this interface from SQL.
24The sqlite3_wal_autocheckpoint() interface
25and the wal_autocheckpoint pragma can be used
26to cause this interface to be run whenever the WAL reaches a certain
27size threshold.
28.Pp
29.Sh SEE ALSO
30.Xr sqlite3 3 ,
31.Xr sqlite3_wal_autocheckpoint 3 ,
32.Xr sqlite3_wal_checkpoint_v2 3
33