xref: /netbsd-src/external/public-domain/sqlite/man/SQLITE_CHANGESETAPPLY_NOSAVEPOINT.3 (revision b9988867a8ad969c45a52aa7628bc932ec98d46b)
1.Dd January 24, 2024
2.Dt SQLITE_CHANGESETAPPLY_NOSAVEPOINT 3
3.Os
4.Sh NAME
5.Nm SQLITE_CHANGESETAPPLY_NOSAVEPOINT ,
6.Nm SQLITE_CHANGESETAPPLY_INVERT ,
7.Nm SQLITE_CHANGESETAPPLY_IGNORENOOP ,
8.Nm SQLITE_CHANGESETAPPLY_FKNOACTION
9.Nd flags for sqlite3changeset_apply_v2
10.Sh SYNOPSIS
11.In sqlite3.h
12.Fd #define SQLITE_CHANGESETAPPLY_NOSAVEPOINT
13.Fd #define SQLITE_CHANGESETAPPLY_INVERT
14.Fd #define SQLITE_CHANGESETAPPLY_IGNORENOOP
15.Fd #define SQLITE_CHANGESETAPPLY_FKNOACTION
16.Sh DESCRIPTION
17The following flags may passed via the 9th parameter to sqlite3changeset_apply_v2
18and sqlite3changeset_apply_v2_strm:
19.Bl -tag -width Ds
20.It SQLITE_CHANGESETAPPLY_NOSAVEPOINT
21Usually, the sessions module encloses all operations performed by a
22single call to apply_v2() or apply_v2_strm() in a SAVEPOINT.
23The SAVEPOINT is committed if the changeset or patchset is successfully
24applied, or rolled back if an error occurs.
25Specifying this flag causes the sessions module to omit this savepoint.
26In this case, if the caller has an open transaction or savepoint when
27apply_v2() is called, it may revert the partially applied changeset
28by rolling it back.
29.It SQLITE_CHANGESETAPPLY_INVERT
30Invert the changeset before applying it.
31This is equivalent to inverting a changeset using sqlite3changeset_invert()
32before applying it.
33It is an error to specify this flag with a patchset.
34.It SQLITE_CHANGESETAPPLY_IGNORENOOP
35Do not invoke the conflict handler callback for any changes that would
36not actually modify the database even if they were applied.
37Specifically, this means that the conflict handler is not invoked for:
38.Bl -bullet
39.It
40a delete change if the row being deleted cannot be found,
41.It
42an update change if the modified fields are already set to their new
43values in the conflicting row, or
44.It
45an insert change if all fields of the conflicting row match the row
46being inserted.
47.El
48.Pp
49.It SQLITE_CHANGESETAPPLY_FKNOACTION
50If this flag it set, then all foreign key constraints in the target
51database behave as if they were declared with "ON UPDATE NO ACTION
52ON DELETE NO ACTION", even if they are actually CASCADE, RESTRICT,
53SET NULL or SET DEFAULT.
54.Sh IMPLEMENTATION NOTES
55These declarations were extracted from the
56interface documentation at line 12211.
57.Bd -literal
58#define SQLITE_CHANGESETAPPLY_NOSAVEPOINT   0x0001
59#define SQLITE_CHANGESETAPPLY_INVERT        0x0002
60#define SQLITE_CHANGESETAPPLY_IGNORENOOP    0x0004
61#define SQLITE_CHANGESETAPPLY_FKNOACTION    0x0008
62.Ed
63.Sh SEE ALSO
64.Xr sqlite3changeset_apply 3 ,
65.Xr sqlite3changeset_apply_strm 3
66