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

function sqlite3_file_control(
  deps: SqliteWasmDep,
): (
  db: SqliteDbPtr,
  zDbName: 0 | CStringPtr,
  op: number,
  pArg: 0 | WasmPtr,
) => SqliteResultCode;

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

Calls the xFileControl method of a schema's file, main for a NULL zDbName, with an opcode and its argument and returns its result; the core handles a few opcodes, such as SQLITE_FCNTL_FILE_POINTER, itself. An unknown schema returns SQLITE_ERROR without recording it for sqlite3_errcode.

Wasm type i(iiii). Signature ["sqlite3_file_control", "int", "sqlite3*", "string", "int", "*"] from SQLite's table.

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