API reference › @evolu/sqlite-wasm › c-api › sqlite3_aggregate_context

function sqlite3_aggregate_context(
  deps: SqliteWasmDep,
): (context: SqliteContextPtr, nBytes: number) => 0 | WasmPtr;

Defined in: packages/sqlite-wasm/src/CApi.ts:2683

Returns the state memory of the current aggregate function instance: the first call allocates nBytes of zeroed memory, later calls return the same buffer, and SQLite frees it when the aggregate concludes. Returns NULL when the first call passes nBytes of zero or less or runs out of memory.

Wasm type i(ii). Signature ["sqlite3_aggregate_context", "void*", "sqlite3_context*", "int"] from SQLite's table.

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