provide extended functionalities
execute all-or-nothing
// operation 1
const withDrawUpdate = prisma.post.update(/* ... */)
// operation 2
const depositeUpdate = prisma.post.update(/* ... */)
// execution: if one fail no one executed
const result = await prisma.$transaction([withDrawUpdate, depositeUpdate])
provide extended functionalities
execute all-or-nothing
// operation 1
const withDrawUpdate = prisma.post.update(/* ... */)
// operation 2
const depositeUpdate = prisma.post.update(/* ... */)
// execution: if one fail no one executed
const result = await prisma.$transaction([withDrawUpdate, depositeUpdate])