[API reference](https://evolu.dev/docs/api-reference) › [@evolu/sqlite-wasm](https://evolu.dev/docs/api-reference/sqlite-wasm) › [c-api](https://evolu.dev/docs/api-reference/sqlite-wasm/c-api) › sqlite3\_update\_hook

```ts
function sqlite3_update_hook(
  deps: SqliteWasmDep,
): (
  db: SqliteDbPtr,
  xCallback: 0 | SqliteFunctionPtr,
  pArg: 0 | WasmPtr,
) => 0 | WasmPtr;
```

Defined in: [packages/sqlite-wasm/src/CApi.ts:1758](https://github.com/evoluhq/evolu/blob/bc4578a260dd15d5bbf94b83765ca05984d194cb/packages/sqlite-wasm/src/CApi.ts#L1758)

Registers the connection's callback for each row inserted, updated or deleted
in a rowid table, replacing the previous one or removing it for NULL, and
returns the previous pArg or NULL. The callback must not modify the
connection and does not fire for WITHOUT ROWID tables, REPLACE conflict
deletions or the truncate optimization.

Wasm type `i(iii)`. Signature `["sqlite3_update_hook", "*", "sqlite3*",
"funcptr:v(pippj)", "*"]` from SQLite's table.

See https://sqlite.org/c3ref/update_hook.html.