Always panic when the result is null but there's no syntax error #1966
marcopolooo
started this conversation in
Ideas
Replies: 1 comment
-
A query that returns no rows is not an error as far as the database is concerned. But if you are expecting exactly one row then use QueryRow, CollectOneRow, or CollectExactlyOneRow. If you are expecting at least one row, but consider zero rows an error then you could write a simple wrapper around CollectRows. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I think we should distinguish between Syntax Error or something like that and the result is null but there's no syntax error.
Because we need to add new error handling to be able to differentiate them. Thanks
CMIIW
Beta Was this translation helpful? Give feedback.
All reactions