sqlc
sqlc copied to clipboard
Add query annotation similar to `:one` that verifies only a single row matches
What do you want to change?
A query may be expected to only match a single row, but due to bugs, ends up accidentally matching multiple rows. Rather than selecting the first row, it can be useful to detect and fail-fast in this scenario.
A new annotation like :only-one that ensures there's only one result can help detect bugs in the query or use early.
What database engines need to be changed?
No response
What programming language backends need to be changed?
No response