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