Skip to content

feat(adapter-pg,adapter-neon): Enforce usage of connection pool - #22687

Merged
SevInf merged 4 commits into
mainfrom
feat/enforce-pool
Jan 18, 2024
Merged

SevInf merged 4 commits into
mainfrom
feat/enforce-pool

Conversation

@SevInf

@SevInf SevInf commented Jan 17, 2024

Copy link
Copy Markdown
Contributor

Adapters don't work with non-pooled Client instances. For pg and
neon we enforce it only on type level, so check won't work for JS
projects. In this PR, we are checking the passed instance and ensuring
it is a Pool, similarly to what we already do for planetscale.

Fix prisma/team-orm#616

Adapters don't work with non-pooled `Client` instances. For `pg` and
`neon` we enforce it only on type level, so check won't work for JS
projects. In this PR, we are checking the passed instance and ensuring
it is a `Pool`, similarly to what we already do for `planetscale`.

Fix prisma/team-orm#616
@SevInf SevInf added this to the 5.9.0 milestone Jan 17, 2024
@github-actions

github-actions Bot commented Jan 17, 2024 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
packages/client/runtime/library.js 195.28 KB (0%)
packages/client/runtime/library.d.ts 101.06 KB (0%)
packages/client/runtime/binary.js 627.27 KB (0%)
packages/client/runtime/binary.d.ts 26 B (0%)
packages/client/runtime/edge.js 236.09 KB (0%)
packages/client/runtime/edge-esm.js 235.88 KB (0%)
packages/client/runtime/index-browser.js 33.5 KB (0%)
packages/client/runtime/index-browser.d.ts 11.96 KB (0%)
packages/cli/build/index.js 2.71 MB (0%)

@SevInf
SevInf marked this pull request as ready for review January 17, 2024 12:53
@SevInf
SevInf requested a review from a team as a code owner January 17, 2024 12:53
@SevInf
SevInf requested review from Jolg42 and aqrln and removed request for a team January 17, 2024 12:53

@Jolg42 Jolg42 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

Comment thread packages/adapter-pg/jest.config.js Resolved
@SevInf
SevInf force-pushed the feat/enforce-pool branch from 21e6636 to f197e9f Compare January 17, 2024 15:44
@SevInf
SevInf merged commit e58b750 into main Jan 18, 2024
@SevInf
SevInf deleted the feat/enforce-pool branch January 18, 2024 09:03
SevInf added a commit that referenced this pull request Jan 18, 2024
…ol (#22687)"

The change broke engines, we'll fix it and reintroduce PR later.

This reverts commit e58b750.
SevInf added a commit that referenced this pull request Jan 18, 2024
…of connection pool (#22687)" (#22699)

The change broke engines, we'll fix it and reintroduce PR later.

This reverts commit e58b750.
SevInf added a commit that referenced this pull request Jan 18, 2024
* feat(adapter-pg,adapter-neon): Enforce usage of connection pool

Adapters don't work with non-pooled `Client` instances. For `pg` and
`neon` we enforce it only on type level, so check won't work for JS
projects. In this PR, we are checking the passed instance and ensuring
it is a `Pool`, similarly to what we already do for `planetscale`.

Fix prisma/team-orm#616

* Add test script

* Attempt to unify jest configs #2

* Fix couple of problems
SevInf added a commit that referenced this pull request Jan 18, 2024
…) (#22700)

* feat(adapter-pg,adapter-neon): Enforce usage of connection pool

Adapters don't work with non-pooled `Client` instances. For `pg` and
`neon` we enforce it only on type level, so check won't work for JS
projects. In this PR, we are checking the passed instance and ensuring
it is a `Pool`, similarly to what we already do for `planetscale`.

Fix prisma/team-orm#616

* Add test script

* Attempt to unify jest configs #2

* Fix couple of problems
Jolg42 added a commit that referenced this pull request Jan 22, 2024
* main:
  chore(deps): update engines to 5.9.0-17.53daea5e19292fbbfc60d3a98b0b811dc848b829 (#22743)
  chore: update @planetscale/database to 1.14.0 (#22709)
  chore(deps): update dependency @codspeed/benchmark.js-plugin to v3 (#22708)
  chore(deps): pin dependencies (#22706)
  chore(deps): update dependency @planetscale/database to v1.14.0 (#22707)
  chore: Fix new-test script (#22716)
  fix(migrate): update tests after fix to #11407 (#22689)
  feat(adapter-pg,adapter-neon): Enforce usage of connection pool (#22687) (#22700)
  revert(client): Revert "feat(adapter-pg,adapter-neon): Enforce usage of connection pool (#22687)" (#22699)
  feat(adapter-pg,adapter-neon): Enforce usage of connection pool (#22687)
  chore(deps): update actions/cache action to v4 (#22697)
  chore: add ability to emit metafiles (#22674)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants