prisma-client-api-transactions
Installation
SKILL.md
Transactions
Execute multiple operations atomically.
Sequential Transactions
Array of operations executed in order:
const [user, post] = await prisma.$transaction([
prisma.user.create({ data: { email: 'alice@prisma.io' } }),
prisma.post.create({ data: { title: 'Hello', authorId: 1 } })
])
All or nothing
If any operation fails, all are rolled back: