is()

Match only rows where column IS value.

For non-boolean columns, this is only relevant for checking if the value of column is NULL by setting value to null.

For boolean columns, you can also set value to true or false and it will behave the same way as .eq().

1const { data, error } = await supabase
2  .from('countries')
3  .select()
4  .is('name', null)

Parameters#

  • columnrequired
    ColumnName

    The column to filter on

  • valuerequired
    object

    The value to filter with

Examples#

Checking nullness#

Using the eq() filter doesn't work when filtering for null:

1create table
2  countries (id int8 primary key, name text);
3
4insert into
5  countries (id, name)
6values
7  (1, 'null'),
8  (2, null);

Instead, you need to use is():

1const { data, error } = await supabase
2  .from('countries')
3  .select()
4  .is('name', null)