Allows you to perform aggregations operations on a User.
Note, that providing undefined is treated as the value not being there.
Read more here: https://pris.ly/d/null-undefined
Select which aggregations you would like to apply and on what fields.
Count the number of Users.
Note, that providing undefined is treated as the value not being there.
Read more here: https://pris.ly/d/null-undefined
Optionalargs: Subset<T, UserCountArgs<DefaultArgs>>Arguments to filter Users to count.
Create a User.
Arguments to create a User.
Create many Users.
Optionalargs: SelectSubset<T, UserCreateManyArgs<ExtArgs>>Arguments to create many Users.
Create many Users and returns the data saved in the database.
Optionalargs: SelectSubset<T, UserCreateManyAndReturnArgs<ExtArgs>>Arguments to create many Users.
// Create many Users
const user = await prisma.user.createManyAndReturn({
data: [
// ... provide data here
]
})
// Create many Users and only return the `dbId`
const userWithDbIdOnly = await prisma.user.createManyAndReturn({
select: { dbId: true },
data: [
// ... provide data here
]
})
Note, that providing `undefined` is treated as the value not being there.
Read more here: https://pris.ly/d/null-undefined
Delete a User.
Arguments to delete one User.
Delete zero or more Users.
Optionalargs: SelectSubset<T, UserDeleteManyArgs<ExtArgs>>Arguments to filter Users to delete.
Find the first User that matches the filter.
Note, that providing undefined is treated as the value not being there.
Read more here: https://pris.ly/d/null-undefined
Optionalargs: SelectSubset<T, UserFindFirstArgs<ExtArgs>>Arguments to find a User
Find the first User that matches the filter or
throw PrismaKnownClientError with P2025 code if no matches were found.
Note, that providing undefined is treated as the value not being there.
Read more here: https://pris.ly/d/null-undefined
Optionalargs: SelectSubset<T, UserFindFirstOrThrowArgs<ExtArgs>>Arguments to find a User
Find zero or more Users that matches the filter.
Note, that providing undefined is treated as the value not being there.
Read more here: https://pris.ly/d/null-undefined
Optionalargs: SelectSubset<T, UserFindManyArgs<ExtArgs>>Arguments to filter and select certain fields only.
Find zero or one User that matches the filter.
Arguments to find a User
Find one User that matches the filter or throw an error with error.code='P2025'
if no matches were found.
Arguments to find a User
Group by User.
Note, that providing undefined is treated as the value not being there.
Read more here: https://pris.ly/d/null-undefined
Group by arguments.
Update one User.
Arguments to update one User.
Update zero or more Users.
Note, that providing undefined is treated as the value not being there.
Read more here: https://pris.ly/d/null-undefined
Arguments to update one or more rows.
Update zero or more Users and returns the data updated in the database.
Arguments to update many Users.
// Update many Users
const user = await prisma.user.updateManyAndReturn({
where: {
// ... provide filter here
},
data: [
// ... provide data here
]
})
// Update zero or more Users and only return the `dbId`
const userWithDbIdOnly = await prisma.user.updateManyAndReturn({
select: { dbId: true },
where: {
// ... provide filter here
},
data: [
// ... provide data here
]
})
Note, that providing `undefined` is treated as the value not being there.
Read more here: https://pris.ly/d/null-undefined
Create or update one User.
Arguments to update or create a User.
Fields of the User model