Igal
Explore posts from serversUsing AsyncLocalStorage to Propagate Transaction Context
It shouldn't be optional.. it should accept a
Kysely
instance, which then also accepts Transaction
and ControlledTransaction
since they're extending Kysely
. No branching points. Unware of transaction or not. Easier to test in isolation.
"Increasing" sounds like an incremental change. I would slowly convert what's needed. If something is affecting too many irrelevant things for the current needs, I'd duplicate it and tag the old version as tech debt.
Write new things with the new style only. Don't unit test these parts, prefer integration tests - if it's PostgreSQL, maybe PGLite could speed things up.9 replies