Add A Changeset To A Changegroup

Add A Changeset To A Changegroup

int sqlite3changegroup_add(sqlite3_changegroup*, int nData, void *pData);

Add all changes within the changeset (or patchset) in buffer pData (size nData bytes) to the changegroup.

If the buffer contains a patchset, then all prior calls to this function on the same changegroup object must also have specified patchsets. Or, if the buffer contains a changeset, so must have the earlier calls to this function. Otherwise, SQLITE_ERROR is returned and no changes are added to the changegroup.

Rows within the changeset and changegroup are identified by the values in their PRIMARY KEY columns. A change in the changeset is considered to apply to the same row as a change already present in the changegroup if the two rows have the same primary key.

Changes to rows that do not already appear in the changegroup are simply copied into it. Or, if both the new changeset and the changegroup c