Raw mysql query not accepting variable input
Example in the docs: https://orm.drizzle.team/docs/sql#sql-template
Code that works for me:
Code that fails for me:
Error message:
Sorry if this question has been asked, I tried searching but failed to find anything. Thank you
Drizzle ORM - Magic sql`` operator
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
3 Replies
figured it out:
Hello, @Saori! Try to use
sql.raw()
here you can find explanation for differences between just sql and sql.raw()
https://orm.drizzle.team/docs/sql#sqlrawDrizzle ORM - Magic sql`` operator
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
ahh interesting. long live asap