Features

Write and run SQL

Querlyn’s editor parses your SQL on every key press with its own parser, so completion, diagnostics and formatting work on statements that are not finished yet.

The SQL editor and completion

Completion reads the statement you are writing, not just the word under the cursor.

  • After o., completion lists the columns of the table aliased o. After FROM and JOIN it lists tables, those of the schemas you work in first. After ON it writes whole join conditions from foreign keys.
  • It never queries the database per key press. Names come from a schema cache kept on your Mac: names and types only, never rows.
  • Where a value fits, completion offers the values of a column: an enum’s members, a CHECK list, or the most common values of a column with few distinct ones. Production connections sample nothing until you turn it on, and masked columns never offer values.
  • Diagnostics underline unknown tables and columns from the cached names. They never block a run.
  • Formatting puts one clause on a line, sets keyword case and keeps comments, in one undo step.
  • Refactorings rename an alias or a WITH query everywhere it is used, extract a subquery to a CTE, inline a CTE, expand * to columns and qualify columns.
  • Multiple cursors, find and replace, folding, and snippets with tab stops. An optional Vim mode has normal, insert and visual modes, motions, operators and registers.
  • Query parameters in each dialect’s form, with a dialog that asks for the values before a run. Values are remembered per tab and never saved.
  • .sql files open, save and Save As, up to 100 MB, with line endings kept. Saved queries live in folders.
After p. in a join, completion lists the columns of payments, the table that alias names, with their types, while the last run’s results stay below.
After p. in a join, completion lists the columns of payments, the table that alias names, with their types, while the last run’s results stay below.

Where it stops

  • The editor works on every engine. It does not wrap lines and has no minimap, and jumping from a name to its definition is not built.
  • Value completion was run against PostgreSQL 18.6, MySQL 8.4.11, CockroachDB and TiDB.
  • Vim mode has no macros, no marks beyond the selection’s, no replace mode and no .vimrc.

Running queries

Run the statement at the cursor, the selection or a whole script, and always see where your transaction stands.

  • Statements are split as the database splits them: semicolons, PostgreSQL dollar quoting, BEGIN … END, SQL Server’s GO, MySQL’s DELIMITER and Oracle’s /. A failed statement stops a script.
  • Cancel a running query, and the rows already there stay.
  • Transactions are always visible: Auto-commit, Manual commit, Transaction open, or Transaction failed. Commit and Roll Back sit in the bar above the editor, and the tab is marked TX. Closing a tab or quitting with a transaction open asks first.
  • Explain shows the plan as a tree, with the heaviest steps marked and estimates that were off by 10 times or more flagged.
  • Explain Analyze runs the statement inside a transaction that is always rolled back. On Production it asks first.
  • Compare two plans side by side: before and after an index, or the same statement on staging and on Production. Steps are paired even when the join order changed, and the largest difference comes first.
  • Compare two results: a tab keeps the result of the run before its last, so Compare shows the rows added, removed and changed. Nothing runs again.
  • Query history keeps every run with its connection, duration and outcome, for 90 days and up to 50,000 entries. On Production it keeps metadata only, not the SQL, by default. A statement that sets a password is kept without its SQL on every connection.
Two query plans compared: after an index the query runs 25 times faster, and the comparison says which steps changed and lines the two plans up.
Two query plans compared: after an index the query runs 25 times faster, and the comparison says which steps changed and lines the two plans up.

Where it stops

  • Explain works on every engine except SingleStore, which has not been run.
  • Explain Analyze: PostgreSQL, CockroachDB, YugabyteDB, MySQL 8.3 or later, TiDB, MariaDB, SQL Server, DuckDB and Oracle.
  • ClickHouse cannot keep a transaction open between runs. Nor can Snowflake, which has not been run against a real account.

The command line

The same connections, routes, passwords and safety checks, from a script.

  • querlyn query --connection <name> --sql "…" runs SQL on a saved connection and writes a table, CSV, JSON or JSON lines, streamed.
  • Production confirmations are refused unless you pass --yes, read-only connections refuse writes, and masked columns stay masked.
  • Each connection says whether the command line may use it. That is off for Production by default.
  • querlyn notebook run <file.ipynb> runs every cell of a notebook without the window, for cron and CI. It was run against SQLite and PostgreSQL 18.
  • The tool is inside the app: Install Command Line Tool links it into /usr/local/bin.

Next: Results and tables or see the databases Querlyn connects to.