struct
Query
pub struct Query {
/* private fields */
}A PostgREST query: filters, ordering and paging, then [Query::get], [Query::insert], [Query::update], [Query::upsert] or [Query::delete].
Methods
select
pub fn select(self, columns: &str) -> QueryColumns (PostgREST syntax, including embedded relations: "id,title,author(name)").
in_list
pub fn in_list(self, column: &str, values: &[&str]) -> QueryRows where column is one of values.
search
pub fn search(self, column: &str, query: &str) -> QueryFull-text search (websearch_to_tsquery).
raw
pub fn raw(self, key: &str, value: &str) -> QueryAny filter, in PostgREST syntax: .raw("or", "(a.eq.1,b.eq.2)").
order
pub fn order(self, column: &str, ascending: bool) -> QueryOrder by column, ascending or descending.
insert
pub fn insert(&self, rows: &Json) -> RequestInsert a row (an object) or rows (an array); returns them.
upsert
pub fn upsert(&self, rows: &Json) -> RequestInsert, or update rows whose primary key already exists.
update
pub fn update(&self, changes: &Json) -> RequestUpdate the matching rows (add a filter first!); returns them.