Skip to main content

nest-drizzle-native

Nest-native Drizzle ORM integration with dependency injection, repositories, and transaction decorators

Module

Nest Module Setup

Register Drizzle clients through forRoot or forRootAsync and inject them with the same provider patterns used across Nest applications.

Repo

Repository Classes

Keep query code in plain provider classes with explicit Drizzle calls, without replacing Drizzle schemas, SQL templates, or type inference.

DB

Named Connections

Register multiple Drizzle clients for operational, analytics, tenant, or migration use cases while keeping injection explicit.

Tx

CLS Transactions

Bridge transaction decorators to the established nestjs-cls transactional stack instead of adding another context implementation.

Zero

Zero Runtime Dependencies

The published package keeps runtime dependencies empty. Nest, Drizzle, drivers, and optional tools stay under the host application's control.

Test

Tested With Real Drizzle

The package suite exercises real libSQL, better-sqlite3, PostgreSQL, and MySQL clients, plus CLS-backed commit and rollback coverage.