JavaScript: Don't match the filter

Match only rows which doesn't satisfy the filter.

Unlike most filters, opearator and value are used as-is and need to follow PostgREST syntax. You also need to make sure they are properly sanitized.

not() expects you to use the raw PostgREST syntax for the filter values.

.not('id', 'in', '(5,6,7)')  // Use `()` for `in` filter
.not('arraycol', 'cs', '{"a","b"}')  // Use `cs` for `contains()`, `{}` for array values

Parameters

Examples

With `select()`

const { data, error } = await supabase
  .from('countries')
  .select()
  .not('name', 'is', null)