API reference › @evolu/sqlite-wasm › c-api › sqlite3_commit_hook
function sqlite3_commit_hook(
deps: SqliteWasmDep,
): (
db: SqliteDbPtr,
xCallback: 0 | SqliteFunctionPtr,
pArg: 0 | WasmPtr,
) => 0 | WasmPtr;
Defined in: packages/sqlite-wasm/src/CApi.ts:1725
Sets the connection's commit callback, replacing the previous one, or removes it for NULL, and returns the previous call's pArg, NULL for the first call. SQLite calls it with pArg before each commit and turns the commit into a rollback when it returns non-zero; it must not modify the connection.
Wasm type i(iii). Signature ["sqlite3_commit_hook", "void*", "sqlite3*", "funcptr:i(p)", "*"] from SQLite's table.