Using a placeholder with an inArray

I'm porting a query to a prepared statement, in the query I used to do something like:

.where(inArray(users.id), ['abc', 'def']))


After trying to move it to a prepared statement:
.where(inArray(users.id), placeholder("userIds"))


However, when I execute the pepared statement and pass { userIds: ['abc', 'def'] } I get a syntax error: PostgresError: syntax error at or near "$1"
Was this page helpful?