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