Typed SQL

The SQL screen: one SELECT, parsed into a structured query. Your text never reaches the database.

The SQL screen accepts a single SELECT in your database’s dialect, with schema-aware autocomplete and a schema picker so FROM needs no prefix. It exists for people who think faster in SQL than in forms, within limits, which is the house style. Ctrl/Cmd+Enter runs; Ctrl/Cmd+Space completes.

Your text never reaches the database

Typed SQL is parsed into the same structured, parameter-bound query the builder produces. The string you typed is not sent anywhere; the compiled, validated query is. The same row limits, risk scoring, and confirmation requirements apply as everywhere else. See Limits & risk model.

Write LIMIT on PostgreSQL and MySQL, TOP on SQL Server, FETCH FIRST on Oracle. A missing limit becomes 500, with a note, rather than a hard reject.

What gets rejected

  • Writes. Any of them. This is not a negotiation.
  • Subqueries. Rejected with an explanation.
  • Aggregates. Rejected with a redirect: aggregate in Explore instead, where the sample is already on hand and the query does not run again.

Also rejected, for the same reason the builder cannot express them:

  • CTEs (WITH)
  • Outer joins
  • UNION / INTERSECT / EXCEPT
  • HAVING, OFFSET
  • Column aliases, expressions, and functions in the select list
  • Optimizer hints and MySQL executable comments
  • More than one statement, and national string literals (N'…')
  • Comparing two columns in a predicate

Rejections explain themselves. If you want a place to paste a 400-line query from a Slack thread titled “quick question,” this is not that place, and it will say so politely.

safe-db is proudly opensource. Apache License 2.0.

GitHub