pub struct Select {
pub ctes: Vec<Cte>,
pub distinct: bool,
pub columns: Vec<SelectColumn>,
pub from: Option<From>,
pub join: Vec<Join>,
pub where_: Where,
pub group: Vec<GroupBy>,
pub having: Where,
pub order: Vec<OrderBy>,
pub limit: Option<usize>,
pub offset: Option<usize>,
}Expand description
A SELECT query.
Fields§
§ctes: Vec<Cte>§distinct: bool§columns: Vec<SelectColumn>§from: Option<From>§join: Vec<Join>§where_: Where§group: Vec<GroupBy>§having: Where§order: Vec<OrderBy>§limit: Option<usize>§offset: Option<usize>Implementations§
source§impl Select
impl Select
pub fn with_raw(self, name: &str, query: &str) -> Self
pub fn with(self, name: &str, query: Select) -> Self
pub fn distinct(self) -> Self
pub fn select(self, expression: &str) -> Self
pub fn from(self, table: &str) -> Self
sourcepub fn where_(self, where_: Where) -> Self
pub fn where_(self, where_: Where) -> Self
Assumes AND. Access the .where_ field directly for more advanced operations.