diff options
| author | Jacob McDonnell <jacob@jacobmcdonnell.com> | 2026-04-25 19:55:15 -0400 |
|---|---|---|
| committer | Jacob McDonnell <jacob@jacobmcdonnell.com> | 2026-04-25 19:55:15 -0400 |
| commit | 253e67c8b3a72b3a4757fdbc5845297628db0a4a (patch) | |
| tree | adf53b66087aa30dfbf8bf391a1dadb044c3bf4d /static/netbsd/man3/SQLITE_CHANGESET_DATA.3 | |
| parent | a9157ce950dfe2fc30795d43b9d79b9d1bffc48b (diff) | |
docs: Added All NetBSD Manuals
Diffstat (limited to 'static/netbsd/man3/SQLITE_CHANGESET_DATA.3')
| -rw-r--r-- | static/netbsd/man3/SQLITE_CHANGESET_DATA.3 | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/static/netbsd/man3/SQLITE_CHANGESET_DATA.3 b/static/netbsd/man3/SQLITE_CHANGESET_DATA.3 new file mode 100644 index 00000000..87fc7b5c --- /dev/null +++ b/static/netbsd/man3/SQLITE_CHANGESET_DATA.3 @@ -0,0 +1,74 @@ +.Dd January 24, 2024 +.Dt SQLITE_CHANGESET_DATA 3 +.Os +.Sh NAME +.Nm SQLITE_CHANGESET_DATA , +.Nm SQLITE_CHANGESET_NOTFOUND , +.Nm SQLITE_CHANGESET_CONFLICT , +.Nm SQLITE_CHANGESET_CONSTRAINT , +.Nm SQLITE_CHANGESET_FOREIGN_KEY +.Nd constants passed to the conflict handler +.Sh SYNOPSIS +.In sqlite3.h +.Fd #define SQLITE_CHANGESET_DATA +.Fd #define SQLITE_CHANGESET_NOTFOUND +.Fd #define SQLITE_CHANGESET_CONFLICT +.Fd #define SQLITE_CHANGESET_CONSTRAINT +.Fd #define SQLITE_CHANGESET_FOREIGN_KEY +.Sh DESCRIPTION +Values that may be passed as the second argument to a conflict-handler. +.Bl -tag -width Ds +.It SQLITE_CHANGESET_DATA +The conflict handler is invoked with CHANGESET_DATA as the second argument +when processing a DELETE or UPDATE change if a row with the required +PRIMARY KEY fields is present in the database, but one or more other +(non primary-key) fields modified by the update do not contain the +expected "before" values. +.Pp +The conflicting row, in this case, is the database row with the matching +primary key. +.It SQLITE_CHANGESET_NOTFOUND +The conflict handler is invoked with CHANGESET_NOTFOUND as the second +argument when processing a DELETE or UPDATE change if a row with the +required PRIMARY KEY fields is not present in the database. +.Pp +There is no conflicting row in this case. +The results of invoking the sqlite3changeset_conflict() API are undefined. +.It SQLITE_CHANGESET_CONFLICT +CHANGESET_CONFLICT is passed as the second argument to the conflict +handler while processing an INSERT change if the operation would result +in duplicate primary key values. +.Pp +The conflicting row in this case is the database row with the matching +primary key. +.It SQLITE_CHANGESET_FOREIGN_KEY +If foreign key handling is enabled, and applying a changeset leaves +the database in a state containing foreign key violations, the conflict +handler is invoked with CHANGESET_FOREIGN_KEY as the second argument +exactly once before the changeset is committed. +If the conflict handler returns CHANGESET_OMIT, the changes, including +those that caused the foreign key constraint violation, are committed. +Or, if it returns CHANGESET_ABORT, the changeset is rolled back. +.Pp +No current or conflicting row information is provided. +The only function it is possible to call on the supplied sqlite3_changeset_iter +handle is sqlite3changeset_fk_conflicts(). +.It SQLITE_CHANGESET_CONSTRAINT +If any other constraint violation occurs while applying a change (i.e. +a UNIQUE, CHECK or NOT NULL constraint), the conflict handler is invoked +with CHANGESET_CONSTRAINT as the second argument. +.Pp +There is no conflicting row in this case. +The results of invoking the sqlite3changeset_conflict() API are undefined. +.El +.Pp +.Sh IMPLEMENTATION NOTES +These declarations were extracted from the +interface documentation at line 12256. +.Bd -literal +#define SQLITE_CHANGESET_DATA 1 +#define SQLITE_CHANGESET_NOTFOUND 2 +#define SQLITE_CHANGESET_CONFLICT 3 +#define SQLITE_CHANGESET_CONSTRAINT 4 +#define SQLITE_CHANGESET_FOREIGN_KEY 5 +.Ed |
