dm_db_set_query_only Function

public function dm_db_set_query_only(db, enabled) result(rc)

Sets query-only PRAGMA.

The SQLite 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 E_READ_ONLY 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.

The function returns the following error codes:

  • E_DB_PREPARE if statement preparation failed.
  • E_DB_STEP if step execution failed or no write permission.

Arguments

Type IntentOptional Attributes Name
type(db_type), intent(inout) :: db

Database type.

logical, intent(in) :: enabled

Enable query-only mode.

Return Value integer


Calls

proc~~dm_db_set_query_only~~CallsGraph proc~dm_db_set_query_only dm_db_set_query_only interface~dm_db_pragma_set dm_db_pragma_set proc~dm_db_set_query_only->interface~dm_db_pragma_set proc~dm_btoa dm_btoa proc~dm_db_set_query_only->proc~dm_btoa