3 ms·
How could I write any serious ecommerce/financial product with Prisma without transactions? Thats is crazy. Sticking with Postgres and plain ol' SQL!
by lukeholder 6y ago
How could I write any serious ecommerce/financial product with Prisma without transactions? Thats is crazy. Sticking with Postgres and plain ol' SQL!
- sorenbs 6y agoPrisma supports transactions through the `prisma.transaction` API. This allow you to perform multiple DB actions in a single request and gives you an all-or-nothing semantic.
- hn_reddit_human 6y agoThanks! IIUC, a "batch" request is run in a transaction.But if I need to run business logic in the middle of requests that's not supported?
- hervelabas 6y agoNot yet indeed. Prisma doesn't support long running transactions and advocates for alternative ways. We're preparing a post on the topic soon, and will improve the means for those alternatives.