Execute SQL panel

Write graph queries in tabs, check them, and run them into the graph area.

The Execute SQL panel: Execute, Query with AI, the tabs and the editor.
The Execute SQL panel: Execute, Query with AI, the tabs and the editor.

Query tabs

The editor

The editor has line numbers and SQL highlighting. Right-click it for:

ItemWhat it does
Copy, Paste, Undo, RedoThe usual editing commands (also with the keyboard shortcuts).
Make font larger / smaller, Bold fontChange the editor's font; the Query results dialog uses the same size.
Format SQLLay the query out on several indented lines.
Clear SQLEmpty the editor.
Insert a random demo querySingle hop, 2-nodes hop or 3-nodes-hop: a random valid query built from the decompiled schema.

Drag the bar under the panel to make it taller; double-click the bar to fit the panel to the query.

Execute

Execute first checks the query with CoraDB's own SQL grammar and the database's schema. If it finds a problem it shows it, and you can fix the query or choose Execute anyways. The result appears in the graph area of the active tab.

When a query returns more nodes than Max nodes displayed in graph (Settings ▸ Options), you are asked whether to show only the first ones or cancel.

Queries that don't return a graph

A query without JSON_GRAPH(...) (for example SELECT * FROM orders) can't be drawn. A warning offers View data as non-graph structure, which opens the Query results dialog.

The warning for a query that does not return a graph.
The warning for a query that does not return a graph.
The Query results dialog.
The Query results dialog.

Query with AI

Describe what you want in plain language and the AI writes the graph query. See AI features.