PRAGMA query_only
The query_only pragma prevents data changes on database files when enabled.
PRAGMA query_only; PRAGMA query_only = boolean;
On the sample database
What PRAGMA query_only returns on the sample database, in SQLite 3.54.1 as built for the browser by sql.js:
| query_only |
|---|
| 0 |
What the SQLite documentation says
The query_only pragma prevents data changes on database files when enabled. When this pragma is enabled, any attempt to CREATE, DELETE, DROP, INSERT, or UPDATE will result in an SQLITE_READONLY error. However, the database is not truly read-only. You can still run a checkpoint or a COMMIT and the return value of the sqlite3_db_readonly() routine is not affected.
From sqlite.org's pragma documentation for SQLite 3.54.1, in the public domain.
← pragma_list · quick_check →