Open dev-shetty opened 4 months ago
I had a somewhat similar problem and reinstalling drizzle fixed it for me (I actually recloned the whole project from github, since I tried the same code on another computer and it worked fine)
Same issue, using SQLite (Turso) always returns an empty array, even though there is data.
const stickersList = await db.select().from(stickers).all(); // output: []
const stickersList = await db.select().from(stickers); // output: []
What version of
drizzle-orm
are you using?0.32.0
What version of
drizzle-kit
are you using?0.23.0
Describe the Bug
I am using Drizzle ORM with Turso SQLite.
I am trying to select the items in a table but I am getting [] (empty array) while using the ORM style fetching. Code and screenshot below
Output:
But while using SQL I am getting the correct output, code and screenshot below:
Output:
Surprisingly, Insert operation works with the ORM fetching, with this code
Expected behavior
This code should also return the rows in the table and not an empty array
Environment & setup
Development environment Using Next.js
14.2.5
Package Manager: pnpm9.5.0