https://github.com/andvarfolomeev/kysely-context
Context for Kysely using AsyncLocalStorage
https://github.com/andvarfolomeev/kysely-context
bun kysely node nodejs
Last synced: 3 months ago
JSON representation
Context for Kysely using AsyncLocalStorage
- Host: GitHub
- URL: https://github.com/andvarfolomeev/kysely-context
- Owner: andvarfolomeev
- License: mit
- Created: 2026-02-26T00:50:22.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2026-02-26T02:18:39.000Z (4 months ago)
- Last Synced: 2026-02-26T06:24:02.242Z (4 months ago)
- Topics: bun, kysely, node, nodejs
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/kysely-context
- Size: 16.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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.
```bash
npm i kysely-context
# or
bun add kysely-context
```
## Benefits
- **Simple** — Kysely doesn't become a monster, API stays clean
- **Automatic transaction propagation** — no need to pass `trx` through all application layers
- **Transparent** — repositories work the same inside and outside transactions
## Examples
See [examples/](./examples) directory.
## License
MIT