1.Dd March 11, 2017 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.Pp 27The constructor for this object is sqlite3_snapshot_get(). 28The sqlite3_snapshot_open() method causes a 29fresh read transaction to refer to an historical snapshot (if possible). 30The destructor for sqlite3_snapshot objects is sqlite3_snapshot_free(). 31.Sh SEE ALSO 32.Xr sqlite3 3 , 33.Xr sqlite3_snapshot_free 3 , 34.Xr sqlite3_snapshot_get 3 , 35.Xr sqlite3_snapshot_open 3 36