You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rows, err:=db.QueryContext(ctx, "select somecol from sometable")
behaves inconsistent between lib/pq and go-sql-driver/mysql. While it is true for pq, it is false for mysql. This gists shows complete code that demonstrates this behaviour:
// HasNextResultSet is called at the end of the current result set and
// reports whether there is another result set after the current one.
HasNextResultSet() bool
// NextResultSet advances the driver to the next result set even
// if there are remaining rows in the current result set.
//
// NextResultSet should return io.EOF when there are no more result sets.
NextResultSet() error
Maybe, lib/pq doesn't have full implementation of NextResultSet?
It can not "skip remaining rows in the current result set."
Uh oh!
There was an error while loading. Please reload this page.
Calling
NextResultSet()
onrows
returned bybehaves inconsistent between
lib/pq
andgo-sql-driver/mysql
. While it istrue
forpq
, it is false formysql
. This gists shows complete code that demonstrates this behaviour:https://gist.github.com/lutzhorn/1aa7de538d1edd0b3904799b5bb972fd
The maintainers of
mysql
claim on the go-nuts mailinglist that returningfalse
ist correct in this scenario.What is the correct behaviour?
The text was updated successfully, but these errors were encountered: