PrismaP
Prisma13mo ago
5 replies
beeps

TypedSql Array Parameter for Postgres

I am attempting to use array parameters as inputs to my queries, but when I generate the client I get the following error:

Error: SQL documentation parsing: invalid type: 'Int[]' (accepted types are: 'Int', 'BigInt', 'Float', 'Boolean', 'String', 'DateTime', 'Json', 'Bytes', 'Decimal')
at '{Int[]} $1:groupIds Array of group IDs to process'.

If I don't include the [] - the input parameter is not of an array type. I am using this in two scenarios: one with an ANY() filter in my where clause, and the other as an unnest($1::text[]) for inserting an array
Was this page helpful?