-
-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
Describe the bug
SafeQL throws an error when using the sql() helper in Postgres. This is a feature that is supported in postgres.js but it seems like SafeQL doesn't allow using this helper in writing queries. The queries below would throw this error Invalid Query: the type "Helper<number[], []>" is not supported".
export async function query(a: number[]) {
return await sql`
SELECT
*
FROM
try_safe_ql
WHERE
id IN ${sql(a)}
`;
}To Reproduce
Steps to reproduce the behavior:
- Setup SafeQL
- Use this code in
.tsfile
export async function query(a: number[]) {
return await sql`
SELECT
*
FROM
try_safe_ql
WHERE
id IN ${sql(a)}
`;
}Expected behavior
Usage of sql() helper should not throw errors
Desktop (please complete the following information):
- OS: MAC OS
- PostgreSQL version 14
- Version [e.g. 22]
Additional context
Add any other context about the problem here.
karlhorky, esdee, pokedotdev, mustakimkr and dboune
Metadata
Metadata
Assignees
Labels
No labels

