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

function sqlite3_collation_needed(
  deps: SqliteWasmDep,
): (
  db: SqliteDbPtr,
  pArg: 0 | WasmPtr,
  xCollNeeded: 0 | SqliteFunctionPtr,
) => SqliteResultCode;

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

Sets the connection's callback for an undefined collation sequence, replacing the previous one. SQLite calls it with pArg, the connection, the preferred text encoding and the UTF-8 collation name, and the callback should register that collation.

Wasm type i(iii). Signature ["sqlite3_collation_needed", "int", "sqlite3*", "*", "*"] from SQLite's table.

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