MySQL select().from() type
Hi. I'm using Drizzle ORM in the Nuxt app where return type of the server is inferred to the frontend.
This works with SQLite:
db.select().from(models.users).all()
But not with MySQL:
db.select().from(models.users)
Maybe it's a noob question, but how could I get the same return type with MySQL?
I guess .all()
do all the magic but there isn't such method using MySQL driver.

1 Reply
I need such "return" type:
[] | Promise<{ row object }>
Not MySqlSelectBase.
const users = await db.select().from(models.users).execute()
.execute() fixed the problem 🙂
-----
const users = await db.select().from(models.users).execute()
.execute() fixed the problem 🙂