Skip to content

Read-Only Mode

Read-Only Mode

DBeagle ships with read-only protection enabled by default. That means mutating SQL is blocked before it reaches your database unless you intentionally switch into write mode.

This is an important part of DBeagle’s product stance:

  • Safe-by-default for production and warehouse exploration
  • Flexible enough to allow writes when you explicitly need them
  • Clear about mode changes instead of hiding them behind silent heuristics

What happens when protection is on

When dbeagle.query.blockMutations is enabled, DBeagle parses the SQL before execution and blocks statements the parser determines are not read-only.

Common blocked categories include:

CategoryStatements
DML writesINSERT, UPDATE, DELETE, MERGE
DDLCREATE, ALTER, DROP, TRUNCATE
PrivilegesGRANT, REVOKE
Other non-read-only statementsStatements the parser flags as mutating or session-changing

If DBeagle blocks a statement, you see:

  • A clear error message
  • An editor diagnostic on the affected statement
  • No driver execution for that blocked statement

How to toggle modes

From the Connections view

Use the toggle in the Connections view header:

  • Read-Only Enabled means blocking is on
  • Write Mode Enabled means blocking is off and writes are allowed

From Settings

Change the setting directly:

{
"dbeagle.query.blockMutations": true
}

The current release applies this toggle globally rather than per connection.

  • Keep read-only enabled for production and shared environments.
  • Even when using DBeagle, prefer read-only database credentials where possible.
  • Switch to write mode only for the exact task that needs it, then switch back.

When write mode is enabled

When you turn protection off, DBeagle stops blocking mutating SQL. At that point:

  • INSERT, UPDATE, DELETE, DDL, and similar statements are allowed through
  • The Results surface can still show completion status for non-tabular statements
  • Responsibility shifts back to your database permissions and your intent

Philosophy

DBeagle’s safety model is simple: fail loudly, make the current mode obvious, and avoid surprise writes.