Prisma ORM · Prisma Client queries

Run several operations atomically

All operations succeed together or none are applied.

await prisma.$transaction([
  prisma.user.update({ where: { id: 1 }, data: { name: "A" } }),
  prisma.post.create({ data: { title: "Hello", authorId: 1 } }),
]);

Official Prisma ORM documentation

More prisma client queries commands

All prisma client queries commands · Prisma ORM cheatsheet

Was this page helpful?