Help › Connect to databases
Choose an environment
What Local, Development, Testing, Staging and Production mean, and everything Querlyn does differently for each.
Querlyn 0.1.0 is not released yet. This help describes it ahead of release.
Every connection has an Environment. It tells Querlyn how much is at stake, and Querlyn is more careful the more there is. You choose it in the connection dialog; a new connection starts as Development.
The five environments and their risk
Querlyn's behavior follows three levels of risk, never the environment's name:
| Environment | Risk |
|---|---|
| Local, Development | Low |
| Testing, Staging | Medium |
| Production | High |
When you choose Production in the dialog, a red line under the choice says what follows: Querlyn marks the connection in red, asks before running statements, and keeps only metadata in the query history unless you choose otherwise under Query history.
How a connection is marked
| Where | Medium risk | High risk |
|---|---|---|
| The sidebar | The environment's name in amber beside the connection, and an amber stripe along everything under it | The same in red |
| The bar above the editor | An amber edge at its left | A red edge |
| The tab | Nothing | A red dot |
| The status bar | The environment's name in amber | PRODUCTION on red |
Local and Development connections are not colored; the status bar names their environment in plain text. The connection list in the bar above the editor groups your connections by environment, so you can see what you are about to choose.
What changes with the risk
| Low | Medium | High | |
|---|---|---|---|
| Before a destructive statement runs | Runs | Asks | Asks |
| Before a statement Querlyn cannot classify runs | Runs | Runs | Asks |
| New tabs start with auto-commit | On | On | Off |
| Applying row edits from the results | Applies | Asks when rows are deleted or a row has no key | Always asks |
| Restoring a backup | Asks | Asks you to type the database's name | Asks you to type the database's name |
| Importing a file | Imports | Imports | Asks |
| Cancelling another session's query in Server Activity | Cancels | Cancels | Asks |
| Turning Read-only off | Turns off | Turns off | Asks |
| Reading a whole table to compare its data or profile it | Reads | Reads | Asks |
| Copying tables into the connection | Copies | Asks before replacing rows | Asks, and asks again before replacing rows; no Pause |
| Query history starts by keeping | The SQL | The SQL | When it ran and how it ended, not the SQL |
| The undo journal of dry runs starts | On | On | Off |
| Columns you marked sensitive are masked | In screen-share mode | In screen-share mode | Always |
| Completion samples a column's values | Yes | Yes | Only once you turn it on |
| A statement that waits for a lock is stopped after | No limit | 30 seconds | 10 seconds |
| A transaction left open is pointed out after | 15 minutes | 5 minutes | 2 minutes |
The first two rows are settings you can change, and so are the rows from the query history on; see Confirm risky statements, What is recorded, The undo journal, Mask on a connection all the time, Values of a column and Lock waits and timeouts. The lock limit applies on the databases that have one; see What works on each database.
Confirm with Touch ID can be turned on for each risk level, so that the questions above take your fingerprint; it is off for all three at the start. See Confirm with Touch ID.
Auto-commit, query history, the undo journal and masking are choices you can change for each connection. If you change a connection's environment later, each goes back to what the new environment starts with.
Which environment to choose
- Production for any database whose data you cannot afford to lose or change by mistake, whatever your team calls it.
- Staging or Testing for shared databases where a dropped table costs someone else an afternoon.
- Development or Local for databases you can rebuild.
A connection imported from DBeaver may keep the name of a connection type you made there. It is treated by its risk level like the environments above.
To be stricter still with one connection, make it read-only: see Read-only connections.
Help for Querlyn 0.1.0. All help topics