z3n
z3n
DTDrizzle Team
Created by z3n on 9/29/2023 in #help
Getting syntax error when using the sql operator (pg)
Trying to execute this line of code:
await db.execute(sql`SET db.tenant_id = ${tenantId};`);
await db.execute(sql`SET db.tenant_id = ${tenantId};`);
the query that is produced by drizzle:
Query: SET db.tenant_id = $1; -- params: ["2"]
Query: SET db.tenant_id = $1; -- params: ["2"]
and getting this error:
PostgresError: syntax error at or near "$1"
PostgresError: syntax error at or near "$1"
No idea why, any insight would be appreciated!
8 replies