Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

prisma transaction

const [posts, totalPosts] = await prisma.$transaction([
  prisma.post.findMany({ where: { title: { contains: 'prisma' } } }),  
  prisma.post.count(),
])
Source by www.prisma.io #
 
PREVIOUS NEXT
Tagged: #prisma #transaction
ADD COMMENT
Topic
Name
8+4 =