Skip to content
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

Helpful error message when a result set is not closed #95

Open
straight-shoota opened this issue Dec 31, 2018 · 0 comments
Open

Helpful error message when a result set is not closed #95

straight-shoota opened this issue Dec 31, 2018 · 0 comments

Comments

@straight-shoota
Copy link
Member

Executing a query on the same connection while a previous result set is still open can lead to weird errors because of unexpected data is sent. It's hard to figure out why it's failing.

An example for this situation:

conn.query_all sql do |rs|
  conn.exec other
end

Is it possible to detect if there is still an unclosed result set hanging around and raise with a friendly error message which explains this?

I encoutered this problem with the PG driver but it's probably similar with others as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants