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