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
Mykhailo
Mykhailo9mo ago
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-first
Drizzle ORM - Query
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
cc
cc9mo ago
Just do const [variable] = drizzle... when it returns an array with 1 data
Want results from more Discord servers?
Add your server