Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zhuravlevma/prisma-unit-of-work
DDD, Unit of work pattern for Typescript, Nest.js, Prisma ⚡
https://github.com/zhuravlevma/prisma-unit-of-work
ddd ddd-patterns javascript nest nestjs orm prisma prisma-client prisma-orm typescript unit-of-work unit-of-work-pattern
Last synced: about 2 hours ago
JSON representation
DDD, Unit of work pattern for Typescript, Nest.js, Prisma ⚡
- Host: GitHub
- URL: https://github.com/zhuravlevma/prisma-unit-of-work
- Owner: zhuravlevma
- License: mit
- Created: 2023-07-29T08:40:08.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-06T15:20:17.000Z (10 months ago)
- Last Synced: 2024-01-07T14:24:37.369Z (10 months ago)
- Topics: ddd, ddd-patterns, javascript, nest, nestjs, orm, prisma, prisma-client, prisma-orm, typescript, unit-of-work, unit-of-work-pattern
- Language: TypeScript
- Homepage:
- Size: 756 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Unit of work pattern for PrismaORM
```typescript
return this.unitOfWork.runInTransaction(async (tx) => {
const updatedAggregate1 = await this.repo.saveAggregate1(entity, { tx });
await this.repo2.saveAggregate2(entity, { tx });
return updatedAggregate1;
});
```![image](https://github.com/zhuravlevma/prisma-unit-of-work/assets/44276887/6ebd10bd-fd88-42cb-8c7c-71a162283e04)