Small. Fast. Reliable.
Choose any three.

About Sitemap Documentation Download License News Support |

## SQLite C Interface

## Constants Passed To The Conflict Handler

>     #define SQLITE_CHANGESET_DATA       1
>     #define SQLITE_CHANGESET_NOTFOUND   2
>     #define SQLITE_CHANGESET_CONFLICT   3
>     #define SQLITE_CHANGESET_CONSTRAINT 4

Values that may be passed as the second argument to a conflict-handler.

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.

  The conflicting row, in this case, is the database row with the matching primary key.

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.

  There is no conflicting row in this case. The results of invoking the sqlite3changeset_conflict() API are undefined.

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.

  The conflicting row in this case is the database row with the matching primary key.

SQLITE_CHANGESET_CONSTRAINT
  If any other constraint violation occurs while applying a change (i.e. a FOREIGN KEY, UNIQUE, CHECK or NOT NULL constraint), the conflict handler is invoked with CHANGESET_CONSTRAINT as the second argument.

  There is no conflicting row in this case. The results of invoking the sqlite3changeset_conflict() API are undefined.

See also lists of Objects, Constants, and Functions.