`findFirst` returns `Record<Key, undefined>` instead of `undefined` for empty result sets
Hi!
For queries with no results, I'm expecting to get
undefined
, as the docs state. However, the return value is an object with all columns/props set to undefined.
I use sqlocal as a SQLite driver. Is this something the driver could be responsible for? Any guidance on where to start looking?2 Replies
Same behavior using
db.select().from(table).get();
.
The types seem fine in both cases.
logs:
Took me a while, but I finally found another issue that validated me.
https://github.com/drizzle-team/drizzle-orm/issues/3394#issuecomment-2912129233
How can I make this issue gather pace? Just suggest a PR? I can't stand having static patches in my project 😄
GitHub
[BUG]: "Cannot read properties of undefined" because empty "rows" d...
What version of drizzle-orm are you using? 0.36.0 What version of drizzle-kit are you using? 0.27.1 Describe the Bug I use Drizzle SQLite Proxy to connect and execute queries to a SQLite WASM datab...