Docs/Query Editor

Query Editor#

QueryMind includes a powerful SQL editor with syntax highlighting, autocomplete, and more.

Editor Features#

Syntax Highlighting#

Full SQL syntax highlighting for:

  • Keywords (SELECT, FROM, WHERE, etc.)
  • Table and column names
  • Strings and numbers
  • Comments

Autocomplete#

Press Ctrl+Space to trigger autocomplete:

  • Table names from your schema
  • Column names when typing after a table
  • SQL keywords and functions
  • Snippets for common patterns

Multiple Tabs#

  • Open multiple query tabs
  • Each tab maintains its own query and results
  • Tabs are preserved across sessions

Keyboard Shortcuts#

ActionMacWindows/Linux
Execute queryCmd+EnterCtrl+Enter
Execute selectedCmd+Shift+EnterCtrl+Shift+Enter
Format SQLCmd+Shift+FCtrl+Shift+F
Comment lineCmd+/Ctrl+/
AutocompleteCtrl+SpaceCtrl+Space

Executing Queries#

Run Entire Query#

Press Cmd+Enter (Mac) or Ctrl+Enter (Windows/Linux) to execute the entire query in the editor.

Run Selection#

  1. Select the SQL you want to run
  2. Press Cmd+Shift+Enter (Mac) or Ctrl+Shift+Enter (Windows/Linux)
  3. Only the selected text is executed

Multiple Statements#

Separate multiple statements with semicolons:

SELECT * FROM users;
SELECT * FROM orders;

Each statement runs sequentially, and results are shown in tabs.

Results Panel#

Table View#

  • Sortable columns (click header)
  • Resizable columns (drag borders)
  • Cell selection for copying
  • Null values highlighted

Export Options#

Export results to:

  • CSV - Comma-separated values
  • JSON - JavaScript Object Notation
  • Excel - .xlsx format (Pro/Max plans)

Row Count#

The status bar shows:

  • Number of rows returned
  • Query execution time
  • Affected rows for DML statements

Query History#

Access previous queries:

  1. Click the History icon in the editor toolbar
  2. Browse or search past queries
  3. Click to restore a query

History includes:

  • Query text
  • Execution timestamp
  • Database context

Next Steps#