diff options
Diffstat (limited to 'static/netbsd/man3/sqlite3_snapshot_cmp.3')
| -rw-r--r-- | static/netbsd/man3/sqlite3_snapshot_cmp.3 | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/static/netbsd/man3/sqlite3_snapshot_cmp.3 b/static/netbsd/man3/sqlite3_snapshot_cmp.3 new file mode 100644 index 00000000..13918507 --- /dev/null +++ b/static/netbsd/man3/sqlite3_snapshot_cmp.3 @@ -0,0 +1,43 @@ +.Dd January 24, 2024 +.Dt SQLITE3_SNAPSHOT_CMP 3 +.Os +.Sh NAME +.Nm sqlite3_snapshot_cmp +.Nd compare the ages of two snapshot handles +.Sh SYNOPSIS +.In sqlite3.h +.Ft int +.Fo sqlite3_snapshot_cmp +.Fa "sqlite3_snapshot *p1" +.Fa "sqlite3_snapshot *p2" +.Fc +.Sh DESCRIPTION +The sqlite3_snapshot_cmp(P1, P2) interface is used to compare the ages +of two valid snapshot handles. +.Pp +If the two snapshot handles are not associated with the same database +file, the result of the comparison is undefined. +.Pp +Additionally, the result of the comparison is only valid if both of +the snapshot handles were obtained by calling sqlite3_snapshot_get() +since the last time the wal file was deleted. +The wal file is deleted when the database is changed back to rollback +mode or when the number of database clients drops to zero. +If either snapshot handle was obtained before the wal file was last +deleted, the value returned by this function is undefined. +.Pp +Otherwise, this API returns a negative value if P1 refers to an older +snapshot than P2, zero if the two handles refer to the same database +snapshot, and a positive value if P1 is a newer snapshot than P2. +.Pp +This interface is only available if SQLite is compiled with the SQLITE_ENABLE_SNAPSHOT +option. +.Sh IMPLEMENTATION NOTES +These declarations were extracted from the +interface documentation at line 10581. +.Bd -literal +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_cmp( + sqlite3_snapshot *p1, + sqlite3_snapshot *p2 +); +.Ed |
