-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Multi-Results Support #420
Comments
Not necessarily. With stored procedures, the last result is not the last query, but an additional acknowledgement afterwards. |
It's simpler to move the query you are interested in to the last position. I have some I'm all for the last one. But formed slightly different: always return the last result matching the call type; counts for I have add I'm not sure yet if it's possible to differentiate between |
Looks like we can have proper Multi-Results Support in Go 1.8: golang/go@86b2f29 |
+1 for this long-awaited feature, we are using sets of prepared stored procedures that return multiple results. |
v1.3 has just been tagged and the master branch is open to potentially less stable changes again. I'd be very glad to accept a pull request on this! If someone (including a new face) wants to work on this, please let us know! |
commit 0e119f8 Author: jszwec <[email protected]> Date: Sun Jan 15 13:41:56 2017 -0500 Multi-Results: review suggestion - get rid of a recursive call commit 8b062e7 Author: jszwec <[email protected]> Date: Sun Jan 15 11:50:06 2017 -0500 Multi-Results: fix hanging rows.Close() * rows.Close() would hang on readUntilEOF if some results were ignored before calling NextResultSet() commit 0ac9483 Author: jszwec <[email protected]> Date: Sun Jan 15 00:50:13 2017 -0500 Multi-Results improvements - support for binary protocol - support statements returning no results - remove emptyRows commit c823aa0 Author: jszwec <[email protected]> Date: Sun Jan 8 20:46:50 2017 -0500 Add Multi-Results support Fixes go-sql-driver#420
Currently the driver returns the first result if there is more than one.
Would it make more sense to return the last result instead?
CREATE TABLE example (num INT); INSERT INTO example VALUES (1), (23), (42); UPDATE example SET num = num+10 WHERE num < 25
I assume that usually the last statement is the one you care about. Any thoughts?
The text was updated successfully, but these errors were encountered: