-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
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
db_mysql testing getRow() for no results #11
Comments
meh but then you need to use tup.row[i] instead of tup[i] everywhere. Much better is a helper proc 'isNull'. And yes, I know nobody will agree with me. |
Ok, I was thinking the following was possible (a Python technique)
but have just learned that Nim can't do that. It would be a useful feature that would eliminate the tup.row[i] you refered to :-) |
Er ... what? Nim of course can do tuple unpacking. |
(I am probably missing the obvious, but ....) So how do you set two independant variables from a proc returning a tuple?
In the current issue, getValue() would return a tuple of (bool, string), the user can then do
and there is no issue with having to do |
proc main() =
let (isO,v)=ttest(44)
# .. |
Ok, Then my proposal is to either For my further education, why MUST it be via |
In devel you can do just that for consistency. Note that IMO it's rarely required. |
This issue has been automatically marked as stale because it has not had recent activity. If you think it is still a valid issue, write a comment below; otherwise it will be closed. Thank you for your contributions. |
Is there a better way of identifying "query returned no result" other then testing that each field of returned seq[string] is an empty string?
Something like a tuple result,
Tuple[hasData: bool, Row: seq[string]]
so that the user knows to process the row only if it hasData
The text was updated successfully, but these errors were encountered: