Skip to main content

Editor Overview

The editor is where you write and test SQL in Kvery. It is built on Monaco — the same editor engine used by VS Code — so it feels familiar and fast, with syntax highlighting, multi-line editing, and code completion.

A focused workspace​

In the editor you:

  • Pick a connection to run against.
  • Write SQL with autocomplete for your schema.
  • Save your changes to the query with Save, or with Save and Run to save it and inspect its results.

New queries are created with Create and Edit on the new-query page, copies with Clone in the Queries list.

Save and Run shows the result beside the editor, always freshly run (without the result cache) and without the Columns, CSV and Excel buttons; open the query's run page to export its result. The icons next to the Connection label open the query's Log, its History and a Fullscreen editor.

When Kvery cannot reach the query's database, the editor shows "Database connection is unavailable!": you can still edit and save the query, but autocomplete, the AI assistant and Save and Run are not available until the connection works again.

Query tabs​

Each query open in the editor has a tab above it, so you can work on related queries side by side. + opens the Add query to editor window: pick a query and click Add query, or click Create new for the new-query page. Switching to another tab, adding a query with Add query or closing the current tab first saves the query you are editing — for a shared query this saves its draft. Closing the last tab returns to the Queries list. On desktop you can drag the tabs to reorder them and right-click a tab for Close Others and Close to the Right.

What the editor gives you​

  • Schema-aware autocomplete — your schemas, tables, and columns are suggested as you type. See Autocomplete and snippets.
  • Snippets — refer to reusable SQL fragments saved at the group level: the editor inserts snippet(''), and the snippet's body is substituted each time the query runs.
  • Directives — Kvery-specific instructions for error handling, HTTP status codes, and webhooks. See Directives.
  • Column modifiers — prefixes that change how a result column is displayed. See Column modifiers.
  • Keyboard shortcuts — run, format, and navigate without leaving the keyboard. See Keyboard shortcuts.

On mobile devices​

Touch and hold the code to open the editor menu with Cut, Copy and Paste (on desktop the editor has no such menu). Paste inserts the text of the clipboard at the cursor. If Kvery cannot read text from the clipboard (for example because the browser or the app does not allow it), Paste opens a small window instead: paste the text into its field with your device's own paste, then tap Insert.

Working with files​

Files are uploaded where they are used:

  • SSL certificates and SSH keys — in the connection fields of the editor, for secure connections.
  • A CSV or Excel data file — with the Import button of the result table, to drive an import.
  • Images — with the upload button of a Textarea form field that has HTML editor? turned on; the image is embedded in the text, not stored as a separate file.

From editor to production​

The editor is the starting point, but a query becomes useful once you save it and then share, schedule, or chart it. When you edit a shared query, saved changes to its SQL and form are kept as a draft: shared links and dashboards, the public query API, the MCP server, Swagger and scheduled runs keep using the published version until you publish.