pugsql
pugsql copied to clipboard
improve errors when misapplying `:one`, `:many`, etc to queries that don't return anything
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)
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!