xref: /netbsd-src/external/public-domain/sqlite/man/sqlite3_snapshot.3 (revision 15a984a0d95c8f96abe9717ee6241762c55dc106)
1.Dd December 19, 2018
2.Dt SQLITE3_SNAPSHOT 3
3.Os
4.Sh NAME
5.Nm sqlite3_snapshot
6.Nd Database Snapshot
7.Sh SYNOPSIS
8.Vt typedef struct sqlite3_snapshot { unsigned char hidden[48]; } sqlite3_snapshot;
9.Sh DESCRIPTION
10An instance of the snapshot object records the state of a WAL mode
11database for some specific point in history.
12.Pp
13In WAL mode, multiple database connections
14that are open on the same database file can each be reading a different
15historical version of the database file.
16When a database connection begins a read transaction,
17that connection sees an unchanging copy of the database as it existed
18for the point in time when the transaction first started.
19Subsequent changes to the database from other connections are not seen
20by the reader until a new read transaction is started.
21.Pp
22The sqlite3_snapshot object records state information about an historical
23version of the database file so that it is possible to later open a
24new read transaction that sees that historical version of the database
25rather than the most recent version.
26.Sh SEE ALSO
27.Xr sqlite3 3
28