interface IUnitOfWork
Since 0.1.0

Unit of Work: transaction-scoped repository access.

All repositories obtained from a Unit of Work share the same underlying transaction and commit or roll back together.

Methods

Since 0.1.0
getRepository<Entity, Id extends EntityKey = string>(entity: string): IRepository<Entity, Id>

Get a transaction-scoped repository for the named entity.

Usage

import { type IUnitOfWork } from "database-plugin/src/index.ts";