1.Dd December 19, 2018 2.Dt SQLITE3CHANGESET_OP 3 3.Os 4.Sh NAME 5.Nm sqlite3changeset_op 6.Nd Obtain The Current Operation From A Changeset Iterator 7.Sh SYNOPSIS 8.Ft int 9.Fo sqlite3changeset_op 10.Fa "sqlite3_changeset_iter *pIter" 11.Fa "const char **pzTab" 12.Fa "int *pnCol" 13.Fa "int *pOp" 14.Fa "int *pbIndirect " 15.Fc 16.Sh DESCRIPTION 17The pIter argument passed to this function may either be an iterator 18passed to a conflict-handler by sqlite3changeset_apply(), 19or an iterator created by sqlite3changeset_start(). 20In the latter case, the most recent call to sqlite3changeset_next() 21must have returned SQLITE_ROW. 22If this is not the case, this function returns SQLITE_MISUSE. 23.Pp 24If argument pzTab is not NULL, then *pzTab is set to point to a nul-terminated 25utf-8 encoded string containing the name of the table affected by the 26current change. 27The buffer remains valid until either sqlite3changeset_next() is called 28on the iterator or until the conflict-handler function returns. 29If pnCol is not NULL, then *pnCol is set to the number of columns in 30the table affected by the change. 31If pbIncorrect is not NULL, then *pbIndirect is set to true (1) if 32the change is an indirect change, or false (0) otherwise. 33See the documentation for sqlite3session_indirect() 34for a description of direct and indirect changes. 35Finally, if pOp is not NULL, then *pOp is set to one of SQLITE_INSERT, 36SQLITE_DELETE or SQLITE_UPDATE, depending 37on the type of change that the iterator currently points to. 38.Pp 39If no error occurs, SQLITE_OK is returned. 40If an error does occur, an SQLite error code is returned. 41The values of the output variables may not be trusted in this case. 42.Sh SEE ALSO 43.Xr sqlite3changeset_apply 3 , 44.Xr sqlite3changeset_next 3 , 45.Xr sqlite3changeset_start 3 , 46.Xr sqlite3session_indirect 3 , 47.Xr SQLITE_CREATE_INDEX 3 , 48.Xr SQLITE_OK 3 , 49.Xr SQLITE_CREATE_INDEX 3 50