Allows you to perform aggregations operations on a RolePermissions.
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 RolePermissions.
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, RolePermissionsCountArgs<DefaultArgs>>Arguments to filter RolePermissions to count.
Create a RolePermissions.
Arguments to create a RolePermissions.
Create many RolePermissions.
Optionalargs: Prisma.SelectSubset<T, RolePermissionsCreateManyArgs<ExtArgs>>Arguments to create many RolePermissions.
Create many RolePermissions and returns the data saved in the database.
Optionalargs: Prisma.SelectSubset<T, RolePermissionsCreateManyAndReturnArgs<ExtArgs>>Arguments to create many RolePermissions.
// Create many RolePermissions
const rolePermissions = await prisma.rolePermissions.createManyAndReturn({
data: [
// ... provide data here
]
})
// Create many RolePermissions and only return the `id`
const rolePermissionsWithIdOnly = await prisma.rolePermissions.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 RolePermissions.
Arguments to delete one RolePermissions.
Delete zero or more RolePermissions.
Optionalargs: Prisma.SelectSubset<T, RolePermissionsDeleteManyArgs<ExtArgs>>Arguments to filter RolePermissions to delete.
Find the first RolePermissions 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, RolePermissionsFindFirstArgs<ExtArgs>>Arguments to find a RolePermissions
Find the first RolePermissions 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, RolePermissionsFindFirstOrThrowArgs<ExtArgs>>Arguments to find a RolePermissions
Find zero or more RolePermissions 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, RolePermissionsFindManyArgs<ExtArgs>>Arguments to filter and select certain fields only.
// Get all RolePermissions
const rolePermissions = await prisma.rolePermissions.findMany()
// Get first 10 RolePermissions
const rolePermissions = await prisma.rolePermissions.findMany({ take: 10 })
// Only select the `id`
const rolePermissionsWithIdOnly = await prisma.rolePermissions.findMany({ select: { id: true } })
Find zero or one RolePermissions that matches the filter.
Arguments to find a RolePermissions
Find one RolePermissions that matches the filter or throw an error with error.code='P2025'
if no matches were found.
Arguments to find a RolePermissions
Group by RolePermissions.
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 RolePermissions.
Arguments to update one RolePermissions.
Update zero or more RolePermissions.
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 RolePermissions and returns the data updated in the database.
Arguments to update many RolePermissions.
// Update many RolePermissions
const rolePermissions = await prisma.rolePermissions.updateManyAndReturn({
where: {
// ... provide filter here
},
data: [
// ... provide data here
]
})
// Update zero or more RolePermissions and only return the `id`
const rolePermissionsWithIdOnly = await prisma.rolePermissions.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 RolePermissions.
Arguments to update or create a RolePermissions.
Fields of the RolePermissions model