Complete the code to import PrismaClient from the Prisma package.
import { [1] } from '@prisma/client';
You need to import PrismaClient to interact with your database using Prisma.
Complete the code to create a new PrismaClient instance.
const prisma = new [1]();You create a new Prisma client by calling new PrismaClient().
Fix the error in the code to fetch all users from the database.
const users = await prisma.user.[1]();To get multiple records, use findMany(). findOne() is deprecated.
Fill both blanks to create a new user with name and email.
const newUser = await prisma.user.create({ data: { name: [1], email: [2] } });Strings must be wrapped in quotes when passed as values.
Fill all three blanks to update a user's email by id.
const updatedUser = await prisma.user.update({ where: { id: [1] }, data: { email: [2] }, select: { [3]: true } });The id is a number without quotes, email is a string with quotes, and select specifies the field to return.
