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

improve errors when misapplying :one, :many, etc to queries that don't return anything #22

Open
mcfunley opened this issue Jul 15, 2019 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@mcfunley
Copy link
Owner

We can probably give a pugsql-specific error when this happens. Currently you get something like:

sqlalchemy.exc.ResourceClosedError: This result object does not return rows. It has been closed automatically.

(Might be driver-specific, not sure)

@mcfunley mcfunley added enhancement New feature or request good first issue Good for newcomers labels Jul 15, 2019
@nihiliad
Copy link

nihiliad commented May 6, 2020

Definitely driver-specific. I got this error because I used the :insert return type with cx_Oracle, which doesn't return anything for inserts. Some documentation about all this would be nice, too. I would be happy to work on it, but I might need a little guidance.

Thanks for a great package, BTW!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants