👋
I think something’s not working properly on serializing lists for PostgREST.
This is not working
Copy code
filter = FilterOperation("id", <http://FilterOperator.IN|FilterOperator.IN>, ids) //ids is a List<Int>
I had to change it to
Copy code
filter = FilterOperation("id", <http://FilterOperator.IN|FilterOperator.IN>, "(${ids.joinToString(",")})") //ids is a List<Int>
First one is sending “in.[1,2,3]” in the filter and it should be “in.(1,2,3)“.
j
Jan
07/12/2024, 11:11 AM
Yea, the parameter does only get transformed in the PostgrestFilterBuilder, not in the constructor of a FilterOperation
n
Nacho Ruiz Martin
07/12/2024, 11:12 AM
So it’s expected that I need to join that manually, right?
The problem is that I can’t use
PostgrestFilterBuilder
in
selectAsFlow
, can I? Why is the reason for that?
j
Jan
07/12/2024, 11:16 AM
So it’s expected that I need to join that manually, right?
Yea, however, we could create an overload for lists
The problem is that I can’t use
PostgrestFilterBuilder
in
selectAsFlow
, can I? Why is the reason for that?
Because that filter is going to be used in the realtime channel, and realtime doesn't support multiple filters.
The single value variant does support this but only because the filters are only used for the postgrest request, and the realtime filter is just going comparing the primary key.