Complete the code to create a new user using Prisma client.
const user = await this.prisma.user.[1]({ data: { name: 'Alice', email: 'alice@example.com' } });
The create method is used to add a new record in Prisma.
Complete the code to find a user by their unique email.
const user = await this.prisma.user.[1]({ where: { email: 'bob@example.com' } });
The findUnique method fetches a single record by a unique field like email.
Fix the error in updating a user's name by their ID.
const updatedUser = await this.prisma.user.[1]({ where: { id: userId }, data: { name: newName } });The update method changes existing records based on a unique identifier.
Fill both blanks to delete a user by their ID and return the deleted user.
const deletedUser = await this.prisma.user.[1]({ where: { id: [2] } });
The delete method removes a record by unique criteria, here by userId.
Fill all three blanks to update a user's email by their ID and return the updated user.
const updatedUser = await this.prisma.user.[1]({ where: { id: [2] }, data: { email: [3] } });
Use update to change the email of a user identified by userId with the new email string.
