-
Notifications
You must be signed in to change notification settings - Fork 330
Closed
Description
First of all, thank you for this Postgres lightweight alternative.
I have found a bug where if you have a table with reserved column names like 'offset' the query will fail because the column name is not quoted:
const event = { offset: 1 };
await sql`insert into events ${sql(event)}`;error= Error: syntax error at or near "offset"
postgres log:
UTC [107] ERROR: syntax error at or near "offset" at character 46
STATEMENT: insert into events (offset) values ($1)
I made a quick and dirty fix forcing 'q' to be always true in types.js line 73.
tracker1, qimingweng, porsager, stalniy and cybercode
Metadata
Metadata
Assignees
Labels
No labels