:wave: I think something’s not working properly on...
# supabase-kt
n
👋 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
Yea, the parameter does only get transformed in the PostgrestFilterBuilder, not in the constructor of a FilterOperation
n
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
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.
n
Ouch, ok 👍. I’ll let it be with
joinToString
for now, then. Thanks!
we could create an overload for lists
LMK if you want that, I’d be able to.