Schema-Aware SQL Editor
The desktop shell’s SQL console is a schema-aware SQL editor built on CodeMirror 6: dialect-aware highlighting, plus autocomplete fed from the introspected schema the shell already loads.
What it does
Section titled “What it does”- Autocomplete offers table names after
FROMand column names after an alias dot, scoped to the tables in theFROMclause where derivable, plus SQL keywords. The dialect (@codemirror/lang-sql) follows the active connection profile (SQLite / SQL Server / PostgreSQL / MySQL). - Execution runs the whole buffer or the current selection. Statements are
split on
;using the language tree (not a regex), so semicolons inside strings and comments are respected. Each statement produces its own result block or error, with the offending statement’s offset on error. - DDL (
CREATE TABLE,DROP, …) still works — full parity with the old console. - Executed statements can be kept as saved-object
queryentries flagged as SQL, plus a lightweight recent-history ring.
Security boundary (unchanged)
Section titled “Security boundary (unchanged)”The editor executes only through the desktop Photino exec-sql bridge — a
local user against their own connection string. It does not open a
server-side arbitrary-SQL execution path. The server’s raw-SQL resolver keeps
its RawSqlValidator gate; the desktop bridge is intentionally unvalidated
local SQL and stays desktop-only. The completion cache is read-only and never
mutates schema.
Related
Section titled “Related”- Export — export console result sets.
- ER diagram — read the schema the autocomplete draws on.
- Saved queries — keep an executed statement as a saved object.
- Desktop app
- Data workbench overview