We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Given an empty table created with this schema:
create table user( id integer primary key, username text unique )
This query
let (id, username) = query: select user(id, username) where id == 1 limit 1
Returns a confusing error:
queries.nim(890) test ormin_sqlite.nim(20) dbError Error: unhandled exception: not an error [DbError]
The text was updated successfully, but these errors were encountered:
If the query result set might be empty, you should try tryQuery:
let (id, username) = tryQuery: select user(id, username) where id == 1 limit 1
The result:
id = 0 name = ""
Sorry, something went wrong.
The result: id = 0 name = ""
It'd be a bit more useful to signify if any result has been returned.
Maybe returning Option(tuple[id: int, name: stirng]) is more reasonable.
No branches or pull requests
Given an empty table created with this schema:
This query
Returns a confusing error:
The text was updated successfully, but these errors were encountered: