Describe the bug
SafeQL throws multiple errors when using the sql tagged template string
on Postgres
, which leads to the errors below
Invalid Query: the type "string | PendingQuery<Row[]>" is not supported
and Invalid Query: Error: syntax error at or near "DEFAULT"
The query below will throw the above errors
export async function query(a: number, b: string, c: string) {
return await sql`
UPDATE
try_safe_ql
SET
b = ${b},
c = ${c || sql`DEFAULT`}
WHERE
a = ${a}
`;
}
To Reproduce
Steps to reproduce the behavior:
.ts
fileexport async function query(a: number, b: string, c: string) {
return await sql`
UPDATE
try_safe_ql
SET
b = ${b},
c = ${c || sql`DEFAULT`}
WHERE
a = ${a}
`;
}
Expected behavior
There shouldn't be an error when using sql tagged template string
**
Screenshots**
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
Owner Name | ts-safeql |
Repo Name | safeql |
Full Name | ts-safeql/safeql |
Language | TypeScript |
Created Date | 2022-09-08 |
Updated Date | 2023-03-16 |
Star Count | 795 |
Watcher Count | 5 |
Fork Count | 14 |
Issue Count | 7 |
Issue Title | Created Date | Updated Date |
---|