Allows you to perform aggregations operations on a Role.
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 Roles.
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, RoleCountArgs<DefaultArgs>>Arguments to filter Roles to count.
Create a Role.
Arguments to create a Role.
Create many Roles.
Optionalargs: Prisma.SelectSubset<T, RoleCreateManyArgs<ExtArgs>>Arguments to create many Roles.
Create many Roles and returns the data saved in the database.
Optionalargs: Prisma.SelectSubset<T, RoleCreateManyAndReturnArgs<ExtArgs>>Arguments to create many Roles.
// Create many Roles
const role = await prisma.role.createManyAndReturn({
data: [
// ... provide data here
]
})
// Create many Roles and only return the `id`
const roleWithIdOnly = await prisma.role.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 Role.
Arguments to delete one Role.
Delete zero or more Roles.
Optionalargs: Prisma.SelectSubset<T, RoleDeleteManyArgs<ExtArgs>>Arguments to filter Roles to delete.
Find the first Role 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, RoleFindFirstArgs<ExtArgs>>Arguments to find a Role
Find the first Role 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, RoleFindFirstOrThrowArgs<ExtArgs>>Arguments to find a Role
Find zero or more Roles 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, RoleFindManyArgs<ExtArgs>>Arguments to filter and select certain fields only.
Find zero or one Role that matches the filter.
Arguments to find a Role
Find one Role that matches the filter or throw an error with error.code='P2025'
if no matches were found.
Arguments to find a Role
Group by Role.
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 Role.
Arguments to update one Role.
Update zero or more Roles.
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 Roles and returns the data updated in the database.
Arguments to update many Roles.
// Update many Roles
const role = await prisma.role.updateManyAndReturn({
where: {
// ... provide filter here
},
data: [
// ... provide data here
]
})
// Update zero or more Roles and only return the `id`
const roleWithIdOnly = await prisma.role.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 Role.
Arguments to update or create a Role.
Fields of the Role model