Help with SQL_PARSE_ERROR When Using Raw SQL Queries in Drizzle ORM with Sqlite ( truso db )
Hello Drizzle ORM Community,
https://orm.drizzle.team/docs/goodies#raw-sql-queries-execution
I'm currently facing an issue with executing a raw SQL query using Drizzle ORM. I'm trying to count the number of users in the
tbl_users
table with the following code snippet:
However, I'm encountering a SQL parse error that I can't seem to resolve. The error message is as follows:
It seems there's an issue with the way the query is being parsed. I'm wondering if I'm using the sql
template literal incorrectly or if there's a different way I should be structuring these types of queries.
Could anyone provide some insight into what might be going wrong here, or share how to correctly execute such a query using Drizzle ORM? Any help would be greatly appreciated!
Thank you in advance!Drizzle ORM - Goodies
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
0 Replies