1.Dd January 24, 2024 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.In sqlite3.h 9.Ft int 10.Fo sqlite3changegroup_output 11.Fa "sqlite3_changegroup*" 12.Fa "int *pnData" 13.Fa "void **ppData" 14.Fc 15.Sh DESCRIPTION 16Obtain a buffer containing a changeset (or patchset) representing the 17current contents of the changegroup. 18If the inputs to the changegroup were themselves changesets, the output 19is a changeset. 20Or, if the inputs were patchsets, the output is also a patchset. 21.Pp 22As with the output of the sqlite3session_changeset() and sqlite3session_patchset() 23functions, all changes related to a single table are grouped together 24in the output of this function. 25Tables appear in the same order as for the very first changeset added 26to the changegroup. 27If the second or subsequent changesets added to the changegroup contain 28changes for tables that do not appear in the first changeset, they 29are appended onto the end of the output changeset, again in the order 30in which they are first encountered. 31.Pp 32If an error occurs, an SQLite error code is returned and the output 33variables (*pnData) and (*ppData) are set to 0. 34Otherwise, SQLITE_OK is returned and the output variables are set to 35the size of and a pointer to the output buffer, respectively. 36In this case it is the responsibility of the caller to eventually free 37the buffer using a call to sqlite3_free(). 38.Sh IMPLEMENTATION NOTES 39These declarations were extracted from the 40interface documentation at line 11983. 41.Bd -literal 42SQLITE_API int sqlite3changegroup_output( 43 sqlite3_changegroup*, 44 int *pnData, /* OUT: Size of output buffer in bytes */ 45 void **ppData /* OUT: Pointer to output buffer */ 46); 47.Ed 48