Allows you to perform aggregations operations on a UserRole.
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 UserRoles.
Note, that providing undefined is treated as the value not being there.
Read more here: https://pris.ly/d/null-undefined
Optionalargs: Prisma.Subset<T, UserRoleCountArgs<DefaultArgs>>Arguments to filter UserRoles to count.
Create a UserRole.
Arguments to create a UserRole.
Create many UserRoles.
Optionalargs: Prisma.SelectSubset<T, UserRoleCreateManyArgs<ExtArgs>>Arguments to create many UserRoles.
Create many UserRoles and returns the data saved in the database.
Optionalargs: Prisma.SelectSubset<T, UserRoleCreateManyAndReturnArgs<ExtArgs>>Arguments to create many UserRoles.
// Create many UserRoles
const userRole = await prisma.userRole.createManyAndReturn({
data: [
// ... provide data here
]
})
// Create many UserRoles and only return the `id`
const userRoleWithIdOnly = await prisma.userRole.createManyAndReturn({
select: { id: 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 UserRole.
Arguments to delete one UserRole.
Delete zero or more UserRoles.
Optionalargs: Prisma.SelectSubset<T, UserRoleDeleteManyArgs<ExtArgs>>Arguments to filter UserRoles to delete.
Find the first UserRole 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: Prisma.SelectSubset<T, UserRoleFindFirstArgs<ExtArgs>>Arguments to find a UserRole
Find the first UserRole 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: Prisma.SelectSubset<T, UserRoleFindFirstOrThrowArgs<ExtArgs>>Arguments to find a UserRole
Find zero or more UserRoles 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: Prisma.SelectSubset<T, UserRoleFindManyArgs<ExtArgs>>Arguments to filter and select certain fields only.
Find zero or one UserRole that matches the filter.
Arguments to find a UserRole
Find one UserRole that matches the filter or throw an error with error.code='P2025'
if no matches were found.
Arguments to find a UserRole
Group by UserRole.
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 UserRole.
Arguments to update one UserRole.
Update zero or more UserRoles.
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 UserRoles and returns the data updated in the database.
Arguments to update many UserRoles.
// Update many UserRoles
const userRole = await prisma.userRole.updateManyAndReturn({
where: {
// ... provide filter here
},
data: [
// ... provide data here
]
})
// Update zero or more UserRoles and only return the `id`
const userRoleWithIdOnly = await prisma.userRole.updateManyAndReturn({
select: { id: 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 UserRole.
Arguments to update or create a UserRole.
Fields of the UserRole model