vapor / postgres-nio

🐘 Non-blocking, event-driven Swift client for PostgreSQL.
https://api.vapor.codes/postgresnio/documentation/postgresnio/
MIT License
305 stars 70 forks source link

Add target `ConnectionPoolModule` #412

Closed fabianfett closed 9 months ago

fabianfett commented 9 months ago

We want to land a new ConnectionPool into PostgresNIO in the comming weeks. Since this pool is abstract, let's create a target and product for it. The target and product are both underscored, to signal that we don't make any API stability guarantees.

Jerry-Carter commented 9 months ago

This change caught my attention. I'm curious, how does this relate to Issue 256? Specifically, does this mean that one or more implementations of a PostgreSQL connection pool will be included with postgres-nio in future? Likewise, will there continue to be support for developers writing their own custom connection pools as is required today?

Thanks.

fabianfett commented 9 months ago

This change caught my attention. I'm curious, how does this relate to #256?

This PR means work on #256 has started.

Specifically, does this mean that one or more implementations of a PostgreSQL connection pool will be included with postgres-nio in future?

Yes we intend to add one implementation directly to PostgresNIO.

Likewise, will there continue to be support for developers writing their own custom connection pools as is required today?

We don't intend to break any adopter. However I'd be curious to learn about your use-case... Maybe the new pool is able to fulfill cater to your needs directly?

Jerry-Carter commented 9 months ago

Thanks and glad to hear it. We're not doing anything clever. I look forward to transitioning to the connection pool as soon as it's available. Eliminating unnecessary code is always a pleasure.

codecov-commenter commented 9 months ago

Codecov Report

Merging #412 (8495cbe) into main (92ee156) will increase coverage by 6.54%. Report is 2 commits behind head on main. The diff coverage is n/a.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #412 +/- ## ========================================== + Coverage 49.19% 55.73% +6.54% ========================================== Files 108 107 -1 Lines 8845 7810 -1035 ========================================== + Hits 4351 4353 +2 + Misses 4494 3457 -1037 ``` [see 5 files with indirect coverage changes](https://app.codecov.io/gh/vapor/postgres-nio/pull/412/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor)