summaryrefslogtreecommitdiff
path: root/static/netbsd/man3/SQLITE_CHANGESET_OMIT.3
blob: 2ba9e9db9b864657e777ac4f255e68ef971d0129 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
.Dd January 24, 2024
.Dt SQLITE_CHANGESET_OMIT 3
.Os
.Sh NAME
.Nm SQLITE_CHANGESET_OMIT ,
.Nm SQLITE_CHANGESET_REPLACE ,
.Nm SQLITE_CHANGESET_ABORT
.Nd constants returned by the conflict handler
.Sh SYNOPSIS
.In sqlite3.h
.Fd #define SQLITE_CHANGESET_OMIT
.Fd #define SQLITE_CHANGESET_REPLACE
.Fd #define SQLITE_CHANGESET_ABORT
.Sh DESCRIPTION
A conflict handler callback must return one of the following three
values.
.Bl -tag -width Ds
.It SQLITE_CHANGESET_OMIT
If a conflict handler returns this value no special action is taken.
The change that caused the conflict is not applied.
The session module continues to the next change in the changeset.
.It SQLITE_CHANGESET_REPLACE
This value may only be returned if the second argument to the conflict
handler was SQLITE_CHANGESET_DATA or SQLITE_CHANGESET_CONFLICT.
If this is not the case, any changes applied so far are rolled back
and the call to sqlite3changeset_apply() returns SQLITE_MISUSE.
.Pp
If CHANGESET_REPLACE is returned by an SQLITE_CHANGESET_DATA conflict
handler, then the conflicting row is either updated or deleted, depending
on the type of change.
.Pp
If CHANGESET_REPLACE is returned by an SQLITE_CHANGESET_CONFLICT conflict
handler, then the conflicting row is removed from the database and
a second attempt to apply the change is made.
If this second attempt fails, the original row is restored to the database
before continuing.
.It SQLITE_CHANGESET_ABORT
If this value is returned, any changes applied so far are rolled back
and the call to sqlite3changeset_apply() returns SQLITE_ABORT.
.El
.Pp
.Sh IMPLEMENTATION NOTES
These declarations were extracted from the
interface documentation at line 12317.
.Bd -literal
#define SQLITE_CHANGESET_OMIT       0
#define SQLITE_CHANGESET_REPLACE    1
#define SQLITE_CHANGESET_ABORT      2
.Ed