-
Notifications
You must be signed in to change notification settings - Fork 803
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
Feat/pgx pool support #1037
Feat/pgx pool support #1037
Conversation
…nto feat/pgx_pool_support
Hopefully this isn't too peanut gallery-ish, but just wanted to say: we're pretty heavily invested in the I installed @Streppel's fork, and as an experiment used it to convert a large-ish slice of our |
That's some excellent news! Thanks for sharing this with us, really glad you are liking it so far @brandur ! Pgx is also one of our core libraries at work :) |
This looks great! Hoping to review it in the next few days. I don't foresee many changes before merging this in. |
@Streppel For review purposes, could you split this into two PRs? One with all the code changes and one with all the tests? GitHub is really struggling with the current size. |
doc driver should be sql_package. |
TL;DR: Working ExampleSupport was added, this is the format:
version: 1
packages:
- path: "tutorial"
name: "tutorial"
engine: "postgresql"
sql_package: "pgx/v4"
schema: "tutorial-schema.sql"
queries: "tutorial-queries.sql"
- path: "reportsv2"
name: "reportsv2"
engine: "postgresql"
sql_package: "pgx/v4"
schema: "reportsv2-schema.sql"
queries: "reportsv2-queries.sql" cc/ @Streppel Would you mind updating your example up top to use the merged behavior? |
fixes #472
This PR implements support for pgx/v4 connection pool with their respective API usage, which differs from the standard database/sql. An example of output can be seen here!
The feature gets enabled when pointing out the
driver
field topgx/v4
, as in the example below:If the field is not informed, it defaults to the current behavior.
This wasn't a huge change in terms of implementation, however there were a lot of tests files to be written, so I decided to create separate test files for both the old and new behaviors. That's the reason the number of modified files is quite big.
We've been using it in our projects and everything has been working nicely so far. We would love to get feedback on this and apply any changes if requested.