This is something that I don't believe can currently be accomplished because of lack of flexibility in the API.
This generates three separate parameters, which will not work.
query.WhereRaw("some_column = ANY(?)", new int[] { 1, 2, 3 });
What's needed is:
"where some_column = ANY('{1,2,3}')"
So if I try the query again, passing the param as a string and then casting it in postgresql:
query.WhereRaw("some_column = ANY(?::int[])","{1, 2, 3 }");
My [] characters get converted to "quotes".
where some_column = ANY('{1,2,3}'::int"""")
This is something that I don't believe can currently be accomplished because of lack of flexibility in the API.
This generates three separate parameters, which will not work.
query.WhereRaw("some_column = ANY(?)", new int[] { 1, 2, 3 });What's needed is:
"where some_column = ANY('{1,2,3}')"So if I try the query again, passing the param as a string and then casting it in postgresql:
query.WhereRaw("some_column = ANY(?::int[])","{1, 2, 3 }");My [] characters get converted to "quotes".
where some_column = ANY('{1,2,3}'::int"""")