schultek / stormberry

Access your postgres database effortlessly from dart code.
https://pub.dev/packages/stormberry
MIT License
66 stars 16 forks source link

Use the postgres v3 client API #67

Closed simolus3 closed 1 year ago

simolus3 commented 1 year ago

Use the experimental v3 library of the postgres package. This is a breaking change that requires re-running the generator.

This should avoid some issues you've had with the v2 API, like the query substituter messing up string literals with @ signs in them, or not being able to fully control the way parameters are encoded. We're also using a binary encoding scheme now, which means that some complexity from this package can be handled by the postgres package more efficiently (like encoding lists, for instance).

I mainly wanted to open this to start a discussion on whether the V3 API is suitable for a package I didn't write ;) Integration tests are passing, but I didn't run the other tests. If something in the API looks weird to you, it would be good to know before version 3 of the postgres package is released.

schultek commented 1 year ago

Thanks a lot for this. The api looks very nice and seems to be working well for stormberry.

I've merged into a feature branch to further work on it and play around. I will let you know if I have any more feedback on the api.

simolus3 commented 1 year ago

That's great to hear, thanks for trying it out!