💾 Filtering data

How to filters your data


Filtering data

Filters allow you to only return rows or apply operations on rows that match certain conditions.
The actions Fetch, Update, Delete and RPC offers two ways to define filters.

You have the option to use either one method or both, as the filters will be combined for the final query to your Supabase instance. The choice is yours.


Method 1 - Using the filters dropdown

This is easiest and the recommanded way to define filters on your actions.
You can define up-to 5 filters to apply on your query.

Supabase - Filters

You can choose the filters combination with:

  • Name
    Filter Combination
    Type
    dropdown
    Description

    Select "AND" (default) to apply all filters simultaneously, or "OR" to match any single filter.

You can then define each filter with:

  • Name
    Not filter?
    Type
    Dropdown
    Description

    Match only rows which doesn't satisfy the filter

  • Name
    Filter type
    Type
    Dropdown
    Description

    The filter to apply

  • Name
    Filter name
    Type
    string
    Description

    The name of the column to filter on

  • Name
    Filter value
    Type
    string
    Description

    The value of the filter


Method 2 - Using Advanced filters

Apply any Supabase filter operators directly to your query by specifying a list of filters.
You can chain filters by placing one per line.

Supabase - Advanced filters

Examples:

Find book with specific title

eq("title", "Harry Potter and the Philosopher's Stone")

Find books by a specific author ID

eq("author_id", 1)

Combine search criteria for author_id and title content

eq("author_id", 2)
like("title", "%Thrones%")

Find books with "Harry Potter" in the title using case-insensitive search

ilike("title", "%Harry Potter%")

Find books either by author_id 1 or with titles containing "Kings"

or("author_id.eq.1,title.like.%Kings%")

Find books by multiple author_id values

in("author_id", [1, 2])

Find books with either "Harry Potter" or "A Game of Thrones" as title

or("title.eq.Harry Potter and the Philosopher's Stone,title.eq.A Game of Thrones")

Find books with titles containing "Chamber" or "Orient"

or("title.like.%Chamber%,title.like.%Orient%")

Do you need any help? Feel free to reach out