UNPKG

@nicheeeer/prisma-transaction

Version:

## Introduction `prisma-transaction` is a library that provides a simple way to use transactions in Prisma within NestJS using decorators. \ It simplifies handling transactions and ensures consistency across services by utilizing `AsyncLocalStorage` to m

17 lines 720 B
import { Prisma } from '@prisma/client'; export interface TransactionOptions { /** * The maximum amount of time Prisma Client will wait to acquire a transaction from the database. The default value is 2 seconds. */ maxWait?: number; /** * The maximum amount of time the interactive transaction can run before being canceled and rolled back. The default value is 5 seconds. */ timeout?: number; /** * By default this is set to the value currently configured in your database. */ isolationLevel?: Prisma.TransactionIsolationLevel; } export declare function Transaction(options?: TransactionOptions): MethodDecorator; //# sourceMappingURL=transaction.decorator.d.ts.map