1.Dd $Mdocdate$ 2.Dt SQLITE3_SNAPSHOT_GET 3 3.Os 4.Sh NAME 5.Nm sqlite3_snapshot_get 6.Nd Record A Database Snapshot 7.Sh SYNOPSIS 8.Ft int SQLITE_STDCALL 9.Fo sqlite3_snapshot_get 10.Fa "sqlite3 *db" 11.Fa "const char *zSchema" 12.Fa "sqlite3_snapshot **ppSnapshot " 13.Fc 14.Sh DESCRIPTION 15The sqlite3_snapshot_get(D,S,P) interface 16attempts to make a new sqlite3_snapshot object that 17records the current state of schema S in database connection D. 18On success, the sqlite3_snapshot_get(D,S,P) 19interface writes a pointer to the newly created sqlite3_snapshot 20object into *P and returns SQLITE_OK. 21If schema S of database connection D is not a WAL mode 22database that is in a read transaction, then sqlite3_snapshot_get(D,S,P) 23leaves the *P value unchanged and returns an appropriate error code. 24.Pp 25The sqlite3_snapshot object returned from a successful 26call to sqlite3_snapshot_get() must be freed 27using sqlite3_snapshot_free() to avoid a memory 28leak. 29.Pp 30The sqlite3_snapshot_get() interface is only 31available when the SQLITE_ENABLE_SNAPSHOT compile-time option is used. 32.Sh SEE ALSO 33.Xr sqlite3 3 , 34.Xr sqlite3_snapshot 3 , 35.Xr sqlite3_snapshot_free 3 , 36.Xr sqlite3_snapshot_get 3 37