K
Kysely•3mo ago
Tim Lonsdale

Is it okay to repeatedly wrap a PG connection pool with kysely?

Chaps, my understanding is that it is safe to repeatedly wrap a postgres connection pool with kysely a la "new Kysely<DB>({dialect: new PostgresDialect({ pool }) })", and I can just let those kysely wrappers get garbage collected. Is this correct?
3 Replies
Tim Lonsdale
Tim LonsdaleOP•3mo ago
to clarify - I understand kysely to simply be a wrapper that interfaces with the underlying pool passed in and is essentially "stateless"
Igal (mobile)
Igal (mobile)•3mo ago
Hey 👋 Yeah.
Tim Lonsdale
Tim LonsdaleOP•3mo ago
nice one - cheers mate

Did you find this page helpful?