Python: Match at least one filter

or_() expects you to use the raw PostgREST syntax for the filter names and values.

.or_('id.in.(5,6,7), arraycol.cs.\{"a","b"\}')  # Use `()` for `in` filter, `\{\}` for array values and `cs` for `contains()`.
.or_('id.in.(5,6,7), arraycol.cd.\{"a","b"\}')  # Use `cd` for `containedBy()`

Parameters

Examples

With `select()`

response = (
    supabase.table("countries")
    .select("name")
    .or_("id.eq.2,name.eq.Algeria")
    .execute()
)

Use `or` with `and`

response = (
    supabase.table("countries")
    .select("name")
    .or_("id.gt.3,and(id.eq.1,name.eq.Afghanistan)")
    .execute()
)

Use `or` on referenced tables

response = (
    supabase.table("countries")
    .select("name, cities!inner(name)")
    .or_("country_id.eq.1,name.eq.Beijing", reference_table="cities")
    .execute()
)