For AI agents: the documentation index is at llms.txt. Guide pages have a markdown version at the same path with .md appended, before any query string or fragment.
Filters allow you to only return rows that match certain conditions.
Filters can be used on select(), update(), upsert(), and delete() queries.
If a Postgres function returns a table response, you can also apply filters.
# Correct
response = (
supabase.table("instruments")
.select("name, section_id")
.eq("name", "flute")
.execute()
)
# Incorrect
response = (
supabase.table("instruments")
.eq("name", "flute")
.select("name, section_id")
.execute()
)
response = (
supabase.table("instruments")
.select("name, section_id")
.gte("octave_range", 3)
.lt("octave_range", 7)
.execute()
)
filterByName = None
filterOctaveLow = 3
filterOctaveHigh = 7
query = supabase.table("instruments").select("name, section_id")
if filterByName:
query = query.eq("name", filterByName)
if filterAgeLow:
query = query.gte("octave_range", filterOctaveLow)
if filterAgeHigh:
query = query.lt("octave_range", filterOctaveHigh)
response = query.execute()
response = (
supabase.table("users")
.select("*")
.eq("address->postcode", 90210)
.execute()
)
response = (
supabase.table("orchestral_sections")
.select("name, instruments!inner(name)")
.eq("instruments.name", "flute")
.execute()
)