feature: read only connections #92
Labels
No labels
CI/CD
UI/UX
autorelease: pending
bug
docs
duplicate
enhancement
good first issue
help wanted
invalid
question
refactor
size
L
size
M
size
S
size
XL
size
XS
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
noe.trevino/dadbod-ui.nvim#92
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Did you check the docs?
Is your feature request related to a problem? Please describe.
There are databases i should never be writing to. Right now the only thing stopping me is me being careful, and that stops working around 5pm on a friday.
I want to say "this one is read only" once and have it actually enforced.
Describe the solution you'd like
Mark a connection read only. Any statement that mutates gets refused. No override, no confirm, just no.
Blocked by #101, which answers "does this statement mutate".
The flag itself lives on the connection, since its a property of that database and not of the engine. The classifier lives on the adapter spec. Worth keeping those two halves apart.
This is opt in, so it only protects the connections i remembered to mark. Thats why it doesnt replace dangerous statement detection (#96).
Acceptance Criteria
connections.jsonDescribe alternatives/other solutions you've considered
Per adapter instead of per connection? Needs deciding before this gets built. Per adapter means all my postgres connections are read only, which is rarely the point, the connection worth protecting is prod and not an engine. Counter argument is its one setting instead of a field on every connection.
Confirm instead of refuse. Thats dangerous statement detection (#96), separate issue. This one is meant to be the hard no.
Skipping the per connection flag and making it global. Too blunt, i want to write to dev.