Open timvandam opened 1 month ago
@timvandam If you can provide a reproduction in this format with the table schema, sql
tag and ESLint error, that would be helpful to understand the problem:
CREATE TABLE users (
-- ...
)
// 💥 Query has incorrect type annotation.
// Expected: { has_private_url: boolean; }
// Actual: { has_private_url: boolean | null; }[]
await sql<{ has_private_url: boolean }[]>`
SELECT
${true} AS has_private_url
FROM
users
`;
Describe the bug A clear and concise description of what the bug is.
Currently inserting/updating nullable timestamptz values in postgres don't work. Using variables of type
Date | null
causes errorESLint: Invalid Query: Unsupported union type(@ts-safeql/ check-sql)
To Reproduce Steps to reproduce the behavior:
Make a table with a nullable timestamptz column and try to insert a
Date | null
valueExpected behavior A clear and concise description of what you expected to happen.
It should work
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context Add any other context about the problem here.
I may have some time to try to fix this over the weekend