Open uasan opened 2 years ago
Boolean array, always passed as a boolean value, here is an example:
await sql`SELECT ${[false, true]} AS bool_array` // Result(1) [ { bool_array: false } ]
this query is throwing an error
await sql`SELECT ${[true, false]}::bool[]`; // Error cannot cast type boolean to boolean[]
I think this PR solves this problem https://github.com/porsager/postgres/pull/392
For now what im doing is this:
await sql`SELECT ${[false, false].map(x => x ? 1 : 0)}::INT[]::BOOLEAN[]`
Boolean array, always passed as a boolean value, here is an example:
this query is throwing an error
I think this PR solves this problem https://github.com/porsager/postgres/pull/392