filter method

PostgrestFilterBuilder filter(
  1. String column,
  2. String operator,
  3. dynamic value
)

Finds all rows whose column satisfies the filter.

postgrest.from('users').select().filter('username', 'eq', 'supabot')

Implementation

PostgrestFilterBuilder filter(String column, String operator, dynamic value) {
  if (value is List) {
    if (operator == 'cs') {
      // `cs` filter requires postgrest array type `{}`
      appendSearchParams(column, '$operator.{${_cleanFilterArray(value)}}');
    } else {
      appendSearchParams(column, '$operator.(${_cleanFilterArray(value)})');
    }
  } else {
    appendSearchParams(column, '$operator.$value');
  }
  return this;
}