accessing results of a select
I am confused. Based on this docs https://orm.drizzle.team/docs/crud this here
todos
should be an array of objects. But it seems to be
What am I missing?Quering with SQL-like syntax [CRUD] – DrizzleORM
Drizzle ORM | %s
7 Replies
Seems like docs are missing an
.all()
?
But how would that work with insert
and returning
?It seems there is on open ticket about this https://github.com/drizzle-team/drizzle-orm/issues/815
GitHub
[BUG]: Undocumented - SQLite requires
.run()
to commit inserts · ...What version of drizzle-orm are you using? 0.27.0 What version of drizzle-kit are you using? 0.19.2 Describe the Bug Running an .insert while using SQLite3 (via better-sqlite3) doesn't do anyth...
Here is more info about it https://discord.com/channels/1043890932593987624/1131653827104350258
TLDR: For now it's a documentation bug. For now the API for sqlite is different. This may or may not change.
Wow I just spent hours trying to figure out why my code wasn’t returning any results! Can’t believe this is still not fixed in the docs.
It's fixed already, we just made sqlite api avalable without .run/.all/.. methods
simple await will work
I switched over to Neon before I found out, but I did see the announcement about the SQLite update!
Sorry for a late response!