Documentation

Query Editor

The heart of QueryGlow. A powerful, Monaco-based SQL environment with built-in safety features and optional AI assistance.

Editor Features

Monaco Editor

Built on the same engine as VS Code. Full syntax highlighting with multi-dialect support—automatically adjusts syntax for MySQL vs PostgreSQL.

Press Ctrl+Space for schema-aware autocomplete: table names, column names with data types, SQL keywords, and functions. Type table. for dot-notation.

Query History

Every query you execute is automatically saved with a timestamp. Click any past query to reload it into the editor.

Stores the last 1,000 queries per connection. Searchable history list.

Saved Queries

Save frequently-used SQL with names, descriptions, and tags for quick access from the sidebar.

Per-connection organization. Edit and delete anytime.

Multiple Queries

Write several queries in the editor at once. Highlight a specific query and pressCtrl+Enterto execute only that one.

Results appear below the editor with execution time.

EXPLAIN Visualizer

Click “Explain” next to “Run” to get a visual query plan. Nodes are color-coded by execution time. Expand any node for buffer stats and row estimates.

Smart warnings detect sequential scans and suggest CREATE INDEX statements. Works with PostgreSQL, MySQL, SQLite, and CockroachDB.

SQL Autocomplete

Schema-aware completions that know your database. Tables, columns with data types, SQL keywords, and functions — all context-aware.

Dot-Notation (Auto-Trigger)

Type a table name followed by a dot to see all columns with their data types.

film. → film_id, title, release_year...

Context-Aware Suggestions

Press Ctrl+Space for completions based on cursor position.

FROM → tables | SELECT → columns + tables

Keywords & Functions

30+ SQL keywords and 30+ functions with auto-parentheses.

COU → COUNT() with cursor inside

Schema Auto-Refresh

After CREATE, ALTER, or DROP TABLE, the schema reloads automatically.

New tables appear in autocomplete instantly

Note: Databases with 200+ tables show a subset for performance. Alias support (e.g., SELECT u. FROM users u) is planned for a future release.

Safe Mode (Default: ON)

The Query Editor includes built-in protection against accidental data loss.

Auto LIMIT

Queries without a LIMIT clause automatically get LIMIT 1000 added. Existing LIMIT values are capped at 1000 maximum.

Blocked Operations

DROP TABLE,TRUNCATE, andDELETE/UPDATE without WHERE are blocked.

Configure via QUERYGLOW_ALLOW_DESTRUCTIVE=true to enable Power Mode. See Environment Variables.

Always Blocked (Cannot Be Enabled)

These operations are blocked regardless of Safe Mode setting—they can never be executed through QueryGlow:

DROP DATABASESHUTDOWNINTO OUTFILELOAD_FILExp_cmdshellCOPY TO/FROM PROGRAM

SQL comments are stripped before security checks to prevent bypass attempts.

AI Assistant (BYOK)

QueryGlow integrates with major LLMs to write SQL for you. Because we are self-hosted, you "Bring Your Own Key" (BYOK). We don't markup the price.

OpenAI
Anthropic (Claude)
Google (Gemini)
How it works: Click the "✨ Ask AI" button, type your request in natural language ("Show top 10 customers by revenue"), and the AI generates valid SQL for your specific database schema.

✓ Privacy: Only schema metadata (table/column names) is sent. No actual row data ever leaves your server.

⚡ Rate Limited: 30 requests per minute to prevent API cost abuse.

Keyboard Shortcuts

ShortcutAction
Ctrl+EnterExecute current query (or highlighted selection)
Ctrl+SpaceTrigger autocomplete (tables, columns, keywords, functions)

On Mac, use Cmd instead of Ctrl.