summaryrefslogtreecommitdiff
path: root/static/netbsd/man3/sqlite3changeset_conflict.3
blob: 897c5e8085ca6f211ff13ee39d5d7af448b39e72 (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
.Dd January 24, 2024
.Dt SQLITE3CHANGESET_CONFLICT 3
.Os
.Sh NAME
.Nm sqlite3changeset_conflict
.Nd obtain conflicting row values from a changeset iterator
.Sh SYNOPSIS
.In sqlite3.h
.Ft int
.Fo sqlite3changeset_conflict
.Fa "sqlite3_changeset_iter *pIter"
.Fa "int iVal"
.Fa "sqlite3_value **ppValue"
.Fc
.Sh DESCRIPTION
This function should only be used with iterator objects passed to a
conflict-handler callback by
.Fn sqlite3changeset_apply
with either SQLITE_CHANGESET_DATA or SQLITE_CHANGESET_CONFLICT.
If this function is called on any other iterator, SQLITE_MISUSE
is returned and *ppValue is set to NULL.
.Pp
Argument iVal must be greater than or equal to 0, and less than the
number of columns in the table affected by the current change.
Otherwise, SQLITE_RANGE is returned and *ppValue is set
to NULL.
.Pp
If successful, this function sets *ppValue to point to a protected
sqlite3_value object containing the iVal'th value from the "conflicting
row" associated with the current conflict-handler callback and returns
SQLITE_OK.
.Pp
If some other error occurs (e.g. an OOM condition), an SQLite error
code is returned and *ppValue is set to NULL.
.Sh IMPLEMENTATION NOTES
These declarations were extracted from the
interface documentation at line 11664.
.Bd -literal
SQLITE_API int sqlite3changeset_conflict(
  sqlite3_changeset_iter *pIter,  /* Changeset iterator */
  int iVal,                       /* Column number */
  sqlite3_value **ppValue         /* OUT: Value from conflicting row */
);
.Ed
.Sh SEE ALSO
.Xr sqlite3changeset_apply 3 ,
.Xr SQLITE_CHANGESET_DATA 3 ,
.Xr SQLITE_OK 3