-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add support for retrieving multiple results. #2
Conversation
Reworked how the msg-ready command (`Z`) is processed. Previously execution of a query would look for the msg-ready command before completing the operation. Now, when executing a query, the driver places the connection into a state where it knows there may be more results. If another query is subsequently executed, the driver waits for the msg-ready command to arrive, discarding any other commands, before sending the new query.
heh, this was confusing. I guess you force pushed master here. Is this the same as #1? |
Yeah, I forced-pushed master to reset us to the upstream state. Then realized the error of my ways. It is almost the same as #1, modulo the |
Before we merge this I'd like to have a plan for cockroachdb/cockroach#3993. I think that issue is going to require a larger refactoring and a more generic interface on My thinking for cockroachdb/cockroach#3993 is that we'd take all of the |
My plan for cockroachdb/cockroach#3993 is less invasive. Currently I'd like to avoid returning a list (slice?) of result or row objects from a single method call. Doing so requires buffering all of the results in memory instead of streaming them off the wire. Is there a particular problem with the |
There's not a particular problem with I still think it would be a little cleaner if the LGTM |
The only purpose of the magic query now is for |
I'm less concerned about exporting the query string than the direction of the relationship between |
If the special `\next` query is executed, the driver looks for another set of results on the connection. If no such results are found, ErrNoMoreResults is returned. Also accessible via the `conn.Next()` method, though this later interface requires direct interaction with lib/pq instead of going through the database/sql package.
d6104a2
to
f24e08a
Compare
Ok, unexported the magic query string and renamed to |
Add support for retrieving multiple results.
If the special
\next
query is executed, the driver looks for anotherset of results on the connection. If no such results are found,
ErrNoMoreResults is returned. Also accessible via the
conn.Next()
method, though this later interface requires direct interaction with
lib/pq instead of going through the database/sql package.