Closed jofmi closed 2 years ago
In /lib/src/postgrest_filter_builder.dart, the method in() seems to use the method _cleanFilterArray() to reformat lists so that lists of values can be passed:
/lib/src/postgrest_filter_builder.dart
in()
_cleanFilterArray()
PostgrestFilterBuilder in_(String column, List values) { appendSearchParams(column, 'in.(${_cleanFilterArray(values)})'); return this; }
The method filter() and not() do not do this, so lists cannot be passed:
filter()
not()
PostgrestFilterBuilder not(String column, String operator, dynamic value) { appendSearchParams(column, 'not.$operator.$value'); return this; }
This makes it difficult to run the command NOT IN.
NOT IN
'in'
value
For now, you can do like this. Let me know if this solves your problem
Thanks @phamhieu! For now, I have solved it by applying _cleanFilterArray() to my lists before I pass them to not()
Problem description
In
/lib/src/postgrest_filter_builder.dart
, the methodin()
seems to use the method_cleanFilterArray()
to reformat lists so that lists of values can be passed:The method
filter()
andnot()
do not do this, so lists cannot be passed:This makes it difficult to run the command
NOT IN
.Possible solutions
'in'
forfilter()
andnot()
and make a new method forNOT IN
_cleanFilterArray()
infilter()
andnot()
if the passed value forvalue
is a list