Performs vertical filtering with SELECT.
string
will need to be used.postgrest-csharp README
range()
queries to paginate through your data.From()
can be combined with ModifiersFrom()
can be combined with Filtersapikey
is technically a reserved keyword, since the API gateway will pluck it out for authentication. It should be avoided as a column name.// Given the following Model (City.cs)
[Table("cities")]
class City : BaseModel
\{
[PrimaryKey("id")]
public int Id \{ get; set; \}
[Column("name")]
public string Name \{ get; set; \}
[Column("country_id")]
public int CountryId \{ get; set; \}
//... etc.
\}
// A result can be fetched like so.
var result = await supabase.From<City>().Get();
var cities = result.Models
// Given the following Model (Movie.cs)
[Table("movies")]
class Movie : BaseModel
\{
[PrimaryKey("id")]
public int Id \{ get; set; \}
[Column("name")]
public string Name \{ get; set; \}
[Column("created_at")]
public DateTime CreatedAt \{ get; set; \}
//... etc.
\}
// A result can be fetched like so.
var result = await supabase
.From<Movie>()
.Select(x => new object[] \{x.Name, x.CreatedAt\})
.Get();
var data = await supabase
.From<Transactions>()
.Select("id, supplier:supplier_id(name), purchaser:purchaser_id(name)")
.Get();
var result = await supabase
.From<Movie>()
.Select("*, users!inner(*)")
.Filter("user.username", Operator.Equals, "Jane")
.Get();
var count = await supabase
.From<Movie>()
.Select(x => new object[] \{ x.Name \})
.Count(CountType.Exact);
var result = await supabase
.From<Users>()
.Select("id, name, address->street")
.Filter("address->postcode", Operator.Equals, 90210)
.Get();