guys, how can I write such request - `SELECT * FRO...
# orm-help
m
guys, how can I write such request -
SELECT * FROM users WHERE email = '<mailto:ccc@gmail.com|ccc@gmail.com>' AND username = 'ccc'
in Prisma?
j
Copy code
client.users.findMany({where: {email: '<mailto:ccc@gmail.com|ccc@gmail.com>', username: 'ccc'}})
👀 1
m
I’d probably use findFirst to get a User object instead of an array of objects.
j
Sure, but a findFirst adds a LIMIT 1. So that is not the exact translation of the OPs query
m
I assumed email and username would be unique in a User table.