Safety & guardrails
Put a thoughtful pause in front of risky work while keeping ordinary reads pleasantly boring.
Good safeguards should catch the expensive mistake without making every ordinary read feel like paperwork. Set a policy on a client, project, environment, server, or database, and it flows down the connection tree until you deliberately change a branch.
The layers, in the order they apply
- The editor warns. While you type, validation flags the shapes that tend to go wrong - an
UPDATEorDELETEwith noWHERE, an identity-columnINSERTwith noSET IDENTITY_INSERT- as squiggles, before you have run anything. - The run gate asks. On Run, SQLly analyses the batch and decides whether it needs a confirmation, an AI review, or a refusal. Nothing has been sent yet.
- The driver enforces. Read-only and rollback-wrap are applied per
GObatch inside the driver, on the way out. They are the last word, and they apply no matter which part of the app started the run.
Splitting it this way is deliberate: the two layers that can be fooled by clever SQL only ever warn or ask, and the layer that decides what actually reaches the server is the simple, boring one.
What you can turn on
Read-only
Refuse anything that is not a read, including read-shaped statements that reach the server's file system.
Rollback wrap
Run the change inside a transaction SQLly rolls back, so you can watch it happen without keeping it.
Confirmation
An explicit yes, with the verbs spelled out, before a data-changing batch runs.
Unbounded-change guard
Warn about - or block - an UPDATE or DELETE that has no WHERE.
Environment cues
Colors and badges so production looks like production before you touch it.
AI review
A plain-language read on a query's side effects before it runs somewhere protected.
Production is its own layer
A connection marked as a Production environment is read-only by
default, whatever its own flags say. When you genuinely need to write, unlock
writes for 1, 5, or 15 minutes from the status-bar chip or the
command palette. While the window is open the chip counts down (4:59),
and every data-changing batch still has to be confirmed with the exact SQL in
front of you. When it expires, the connection locks itself again.
In this section
- Read-only connections — Make a connection genuinely read-only when browsing is all it should ever do.
- Auto-wrap in a transaction — Put non-read work inside a transaction you can inspect and roll back before it becomes permanent.
- Require a confirmation — Ask for an unmistakable "yes, really" before a non-SELECT statement gets to run.
- Refuse UPDATE/DELETE with no WHERE — Catch, warn about, or block broad UPDATE and DELETE statements before a tiny omission becomes a very long afternoon.
- Environment colors & cues — Give production the visual warning it deserves so your peripheral vision can save the day.
- AI review for data-changing queries — Ask for a plain-language read on a query's side effects before it runs in a protected place.