@nest-batch/drizzle
v0.2.2
Published
Drizzle ORM adapter SLOT for @nest-batch/core — JobRepository and TransactionManager interface shape, paired with @nest-batch/postgresql (Postgres driver) or @nest-batch/mysql (MySQL driver).
Maintainers
Readme
@nest-batch/drizzle
Drizzle persistence adapter slot for @nest-batch/core.
Korean: README.ko.md
Install
pnpm add @nest-batch/core @nest-batch/drizzle drizzle-ormPair it with @nest-batch/postgresql or @nest-batch/mysql when you need
driver-specific schema and runtime bindings.
Public Imports
import {
DrizzleAdapter,
DrizzleDriverProvider,
DrizzleJobRepository,
DrizzleTransactionManager,
} from '@nest-batch/drizzle';Wiring
The host application owns the Drizzle database instance and migration flow.
import { InProcessAdapter, NestBatchModule } from '@nest-batch/core';
import { DrizzleAdapter } from '@nest-batch/drizzle';
NestBatchModule.forRoot({
adapters: {
persistence: DrizzleAdapter.forRoot(),
transport: InProcessAdapter.forRoot(),
},
});For PostgreSQL and MySQL table definitions, import the schema from the matching driver package:
import { postgresDrizzleSchema } from '@nest-batch/postgresql';
import { mysqlDrizzleSchema } from '@nest-batch/mysql';