C#: Using filters

Filters allow you to only return rows that match certain conditions.

Filters can be used on Select(), Update(), and Delete() queries.

Note: LINQ expressions do not currently support parsing embedded resource columns. For these cases, string will need to be used.

Examples

Applying Filters

var result = await supabase.From<City>()
      .Select(x => new object[] \{ x.Name, x.CountryId \})
      .Where(x => x.Name == "The Shire")
      .Single();

Filter by values within a JSON column

var result = await supabase.From<City>()
  .Filter("address->postcode", Operator.Equals, 90210)
  .Get();

Filter Foreign Tables

var results = await supabase.From<Country>()
  .Select("name, cities!inner(name)")
  .Filter("cities.name", Operator.Equals, "Bali")
  .Get();