Allows you to perform aggregations operations on a UserPremium.
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 UserPremiums.
Note, that providing undefined is treated as the value not being there.
Read more here: https://pris.ly/d/null-undefined
Optionalargs: Subset<T, UserPremiumCountArgs<DefaultArgs>>Arguments to filter UserPremiums to count.
Create a UserPremium.
Arguments to create a UserPremium.
Create many UserPremiums.
Optionalargs: SelectSubset<T, UserPremiumCreateManyArgs<ExtArgs>>Arguments to create many UserPremiums.
Create many UserPremiums and returns the data saved in the database.
Optionalargs: SelectSubset<T, UserPremiumCreateManyAndReturnArgs<ExtArgs>>Arguments to create many UserPremiums.
// Create many UserPremiums
const userPremium = await prisma.userPremium.createManyAndReturn({
data: [
// ... provide data here
]
})
// Create many UserPremiums and only return the `dbId`
const userPremiumWithDbIdOnly = await prisma.userPremium.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 UserPremium.
Arguments to delete one UserPremium.
Delete zero or more UserPremiums.
Optionalargs: SelectSubset<T, UserPremiumDeleteManyArgs<ExtArgs>>Arguments to filter UserPremiums to delete.
Find the first UserPremium 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, UserPremiumFindFirstArgs<ExtArgs>>Arguments to find a UserPremium
Find the first UserPremium 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, UserPremiumFindFirstOrThrowArgs<ExtArgs>>Arguments to find a UserPremium
Find zero or more UserPremiums 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, UserPremiumFindManyArgs<ExtArgs>>Arguments to filter and select certain fields only.
// Get all UserPremiums
const userPremiums = await prisma.userPremium.findMany()
// Get first 10 UserPremiums
const userPremiums = await prisma.userPremium.findMany({ take: 10 })
// Only select the `dbId`
const userPremiumWithDbIdOnly = await prisma.userPremium.findMany({ select: { dbId: true } })
Find zero or one UserPremium that matches the filter.
Arguments to find a UserPremium
Find one UserPremium that matches the filter or throw an error with error.code='P2025'
if no matches were found.
Arguments to find a UserPremium
Group by UserPremium.
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 UserPremium.
Arguments to update one UserPremium.
Update zero or more UserPremiums.
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 UserPremiums and returns the data updated in the database.
Arguments to update many UserPremiums.
// Update many UserPremiums
const userPremium = await prisma.userPremium.updateManyAndReturn({
where: {
// ... provide filter here
},
data: [
// ... provide data here
]
})
// Update zero or more UserPremiums and only return the `dbId`
const userPremiumWithDbIdOnly = await prisma.userPremium.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 UserPremium.
Arguments to update or create a UserPremium.
Fields of the UserPremium model