prisma.user.findMany({ where: { AND: [{ active: true }, { age: { gte: 18 } }] }, select: { id: true, email: true, _count: { select: { posts: true } } }, include: { posts: { orderBy: { createdAt: "desc" }, take: 5 } }, orderBy: { createdAt: "desc" }, skip: 20, take: 10 }). Cursor-based pagination: cursor: { id: lastId }, skip: 1. Транзакции: prisma.$transaction([op1, op2]) или interactive: prisma.$transaction(async tx => {}). Raw SQL: prisma.$queryRaw, prisma.$executeRaw.
Как делать сложные запросы в Prisma?
Senior
281 просмотровAFK Offer AI
Как реализовать connection pooling в Node.js приложении?