How to use db.query.comments.findFirst with WHERE on comments.post.auhor.name?
Using the schema example from the doc: https://orm.drizzle.team/docs/rqb#select-filters
I'm trying to find the nicest way to write
Find a comment by specific comment.text AND specific comment.post.author.name ?
Schema:
So the question is, is this query possible with drizzle and use
Find a comment by specific comment.text AND specific comment.post.author.name ?
I'm aware comment's text and author (user) name are not unique like user id or comment Id, let's just ignore that for now.
I'm trying to find the nicest way to write
db.query.comments.findFirst for:Find a comment by specific comment.text AND specific comment.post.author.name ?
Schema:
So the question is, is this query possible with drizzle and use
db.query.comments.findFirst for:Find a comment by specific comment.text AND specific comment.post.author.name ?
I'm aware comment's text and author (user) name are not unique like user id or comment Id, let's just ignore that for now.
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.