1.Dd December 19, 2018 2.Dt SQLITE3CHANGEGROUP_OUTPUT 3 3.Os 4.Sh NAME 5.Nm sqlite3changegroup_output 6.Nd Obtain A Composite Changeset From A Changegroup 7.Sh SYNOPSIS 8.Ft int 9.Fo sqlite3changegroup_output 10.Fa "sqlite3_changegroup*" 11.Fa "int *pnData" 12.Fa "void **ppData " 13.Fc 14.Sh DESCRIPTION 15Obtain a buffer containing a changeset (or patchset) representing the 16current contents of the changegroup. 17If the inputs to the changegroup were themselves changesets, the output 18is a changeset. 19Or, if the inputs were patchsets, the output is also a patchset. 20.Pp 21As with the output of the sqlite3session_changeset() and sqlite3session_patchset() 22functions, all changes related to a single table are grouped together 23in the output of this function. 24Tables appear in the same order as for the very first changeset added 25to the changegroup. 26If the second or subsequent changesets added to the changegroup contain 27changes for tables that do not appear in the first changeset, they 28are appended onto the end of the output changeset, again in the order 29in which they are first encountered. 30.Pp 31If an error occurs, an SQLite error code is returned and the output 32variables (*pnData) and (*ppData) are set to 0. 33Otherwise, SQLITE_OK is returned and the output variables are set to 34the size of and a pointer to the output buffer, respectively. 35In this case it is the responsibility of the caller to eventually free 36the buffer using a call to sqlite3_free(). 37