RaisDBRaisDB
Connection Manage

Query Console

The SQL editor — autocomplete, EXPLAIN, safety check, and results.

Open a new SQL tab via Cmd/Ctrl + Q (or right-click database → Query Console).

Toolbar

Run / Cancel

The button toggles between Play and Stop. There is no global Cmd/Ctrl + Enter — click Run. Click again to cancel an in-flight query.

Safety check

The ShieldCheck button runs the SQL safety checker. Writes in read-only mode are rejected, and destructive patterns (DROP, TRUNCATE, unguarded DELETE) are flagged.

Format

The wand button runs sql-formatter on the buffer.

Explain

The Activity button issues an EXPLAIN against the engine and renders the result in a side tab.

Open file / Clear / Save

Open a .sql file, clear the buffer, or pin the query to Saved Queries.

Auto-completion

Live, schema-driven — not static.

What completes

Table names, column names, SQL keywords, SQL function signatures.

How it's populated

  • Table list comes from useTables (throttled 500 ms, capped at 50 tables)
  • Column + FK info per table is fetched on demand
  • All wired into Monaco as completion / hover / signature / definition providers

EXPLAIN

The dispatcher speaks the engine's native dialect:

EngineSQL issued
PostgreSQLEXPLAIN (FORMAT JSON) <sql>
MySQLEXPLAIN <sql>
SQLiteEXPLAIN QUERY PLAN <sql>
OtherEXPLAIN <sql> (raw)

The result is rendered in QueryPlanViewer as a side tab.

Single-statement execution

The editor runs one statement per Run click. The safety checker detects multi-statement SQL and warns, but the backend still rejects it.

Running multi-statement files

For SQL files with multiple statements, use the SQL file import wizard (right-click schema → Import → SQL). It streams statements one at a time.

History

Every run is logged with timestamp, duration, row count, and success / error. See History & Saved Queries.

On this page