xref: /netbsd-src/external/public-domain/sqlite/man/sqlite3changeset_next.3 (revision b9988867a8ad969c45a52aa7628bc932ec98d46b)
1.Dd January 24, 2024
2.Dt SQLITE3CHANGESET_NEXT 3
3.Os
4.Sh NAME
5.Nm sqlite3changeset_next
6.Nd advance a changeset iterator
7.Sh SYNOPSIS
8.In sqlite3.h
9.Ft int
10.Fo sqlite3changeset_next
11.Fa "sqlite3_changeset_iter *pIter"
12.Fc
13.Sh DESCRIPTION
14This function may only be used with iterators created by the function
15.Fn sqlite3changeset_start .
16If it is called on an iterator passed to a conflict-handler callback
17by
18.Fn sqlite3changeset_apply ,
19SQLITE_MISUSE is returned and the call has no effect.
20.Pp
21Immediately after an iterator is created by sqlite3changeset_start(),
22it does not point to any change in the changeset.
23Assuming the changeset is not empty, the first call to this function
24advances the iterator to point to the first change in the changeset.
25Each subsequent call advances the iterator to point to the next change
26in the changeset (if any).
27If no error occurs and the iterator points to a valid change after
28a call to sqlite3changeset_next() has advanced it, SQLITE_ROW is returned.
29Otherwise, if all changes in the changeset have already been visited,
30SQLITE_DONE is returned.
31.Pp
32If an error occurs, an SQLite error code is returned.
33Possible error codes include SQLITE_CORRUPT (if the changeset buffer
34is corrupt) or SQLITE_NOMEM.
35.Sh IMPLEMENTATION NOTES
36These declarations were extracted from the
37interface documentation at line 11502.
38.Bd -literal
39SQLITE_API int sqlite3changeset_next(sqlite3_changeset_iter *pIter);
40.Ed
41.Sh SEE ALSO
42.Xr sqlite3changeset_apply 3 ,
43.Xr sqlite3changeset_start 3
44