Can I see generated raw sql query that is generated from drizzle-orm query?
Trying to sanity check my query, would be nice to see the query sent in. For example, if I send in:
db.update(table).set({ some: 'obj'}).where(eq(table.field, 'newval'));
would equate to:
UPDATE table SET some = 'obj' WHERE field = 'newval';
2 Replies
Sort of.
This returns the query string, but the parameters are separate.
https://orm.drizzle.team/docs/goodies#printing-sql-query
Drizzle ORM - Goodies
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
That's close enough. Didn't get that far in the docs. Thank you @Sillvva 🙂