kysely-context
v1.0.1
Published
Context manager for Kysely using AsyncLocalStorage
Maintainers
Readme
kysely-context
Context manager for Kysely using AsyncLocalStorage. Automatically propagates transactions through call chains without explicit parameter passing. Keeps Kysely simple while adding convenient transaction support to repositories.
npm i kysely-context
# or
bun add kysely-contextBenefits
- Simple — Kysely doesn't become a monster, API stays clean
- Automatic transaction propagation — no need to pass
trxthrough all application layers - Transparent — repositories work the same inside and outside transactions
Examples
See examples/ directory.
License
MIT
