[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\_db\_readonly

```ts
function sqlite3_db_readonly(
  deps: SqliteWasmDep,
): (db: SqliteDbPtr, zDbName: CStringPtr) => number;
```

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

Returns 1 if a schema of the connection is read-only, 0 if it is read/write,
or -1 when no schema has that name.

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

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