Is it possible to select 1 row?
Seems an annoying oversight that I have to implement variable[0] everytime, even though I'm matching unique IDs
2 Replies
Hello, @mwjt42. It is how sql works, but you can try relational queries and
findFirst
method and get only 1 record.
https://orm.drizzle.team/docs/rqb
https://orm.drizzle.team/docs/rqb#find-firstDrizzle ORM - Query
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
Just do
const [variable] = drizzle...
when it returns an array with 1 data