I have the following statement to as part of a larger query:
sql`AND my_table.some_column = ANY(${values}::${pgSql(type)}[])`
When type is text, it works as expected. When type is int I get the following error:
Error [PostgresError]: type "int[]" does not exist
Shouldn't I be able to use dynamic type casting for both text and int ?