lpil / pog

🐘 A PostgreSQL database client for Gleam, based on PGO
https://hexdocs.pm/pgo
Apache License 2.0
145 stars 13 forks source link

Add support for query timeout #39

Open ghivert opened 1 month ago

ghivert commented 1 month ago

Hi!

Currently we have no way to customise the query timeout. According to pgo#50, it should be easy to add timeout, and we could do this in a nice way. I'd be happy to submit a PR for the feature, but I think we could gain to design a nice API.

Do you have any opinion on the subject?

lpil commented 1 month ago

Yes lets get this done for sure.

I want to rework the whole API of this package, so I'm open to any ideas. I was likely going to use a builder API.

ghivert commented 1 month ago

Builder API for what part of the API exactly? The connection? The query execution? I struggle a bit finding out what part of the API you're not happy with.

lpil commented 1 month ago

The whole API. I think currently it's a bit awkward for most uses and it's hard to extend presently.