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

function sqlite3_stmt_readonly(
  deps: SqliteWasmDep,
): (pStmt: SqliteStmtPtr) => number;

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

Returns non-zero when a statement cannot directly change the database file, though application-defined functions or virtual tables it calls still might. Transaction control, ATTACH and DETACH count as read-only; BEGIN IMMEDIATE, BEGIN EXCLUSIVE and any statement that might write do not.

Wasm type i(i). Signature ["sqlite3_stmt_readonly", "int", "sqlite3_stmt*"] from SQLite's table.

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