xref: /netbsd-src/external/public-domain/sqlite/man/sqlite3session_isempty.3 (revision b9988867a8ad969c45a52aa7628bc932ec98d46b)
1.Dd January 24, 2024
2.Dt SQLITE3SESSION_ISEMPTY 3
3.Os
4.Sh NAME
5.Nm sqlite3session_isempty
6.Nd test if a changeset has recorded any changes
7.Sh SYNOPSIS
8.In sqlite3.h
9.Ft int
10.Fo sqlite3session_isempty
11.Fa "sqlite3_session *pSession"
12.Fc
13.Sh DESCRIPTION
14Return non-zero if no changes to attached tables have been recorded
15by the session object passed as the first argument.
16Otherwise, if one or more changes have been recorded, return zero.
17.Pp
18Even if this function returns zero, it is possible that calling
19.Fn sqlite3session_changeset
20on the session handle may still return a changeset that contains no
21changes.
22This can happen when a row in an attached table is modified and then
23later on the original values are restored.
24However, if this function returns non-zero, then it is guaranteed that
25a call to sqlite3session_changeset() will return a changeset containing
26zero changes.
27.Sh IMPLEMENTATION NOTES
28These declarations were extracted from the
29interface documentation at line 11410.
30.Bd -literal
31SQLITE_API int sqlite3session_isempty(sqlite3_session *pSession);
32.Ed
33.Sh SEE ALSO
34.Xr sqlite3session_changeset 3
35