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? |
|
I'm really glad to see how this PR helped the project grow in functionality and adoption. |
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
driverfield 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.