pub struct SelectQuery {Show 18 fields
pub entity: String,
pub projection: Vec<String>,
pub expr_projection: Vec<NamedExpr>,
pub filter: Option<Expr>,
pub having: Option<Expr>,
pub order_by: Vec<OrderBy>,
pub slice: Option<Slice>,
pub aggregates: Vec<Aggregate>,
pub group_by: Vec<String>,
pub relations: Vec<RelationLoad>,
pub aggregation_cache: Option<AggregationCacheOptions>,
pub comment: Option<String>,
pub raw_sql: Option<String>,
pub raw_sql_search_criteria: Vec<String>,
pub dynamic_properties: Vec<RawSqlProjection>,
pub raw_projections: Vec<RawSqlProjection>,
pub object_group_bys: Vec<ObjectGroupBy>,
pub child_enhancements: Vec<SelectQuery>,
}Fields§
§entity: String§projection: Vec<String>§expr_projection: Vec<NamedExpr>§filter: Option<Expr>§having: Option<Expr>§order_by: Vec<OrderBy>§slice: Option<Slice>§aggregates: Vec<Aggregate>§group_by: Vec<String>§relations: Vec<RelationLoad>§aggregation_cache: Option<AggregationCacheOptions>§comment: Option<String>§raw_sql: Option<String>§raw_sql_search_criteria: Vec<String>§dynamic_properties: Vec<RawSqlProjection>§raw_projections: Vec<RawSqlProjection>§object_group_bys: Vec<ObjectGroupBy>§child_enhancements: Vec<SelectQuery>Implementations§
Source§impl SelectQuery
impl SelectQuery
pub fn new(entity: impl Into<String>) -> Self
pub fn project(self, field: impl Into<String>) -> Self
pub fn projects( self, fields: impl IntoIterator<Item = impl Into<String>>, ) -> Self
pub fn project_expr(self, alias: impl Into<String>, expr: Expr) -> Self
pub fn project_raw( self, alias: impl Into<String>, raw_sql_segment: impl Into<String>, ) -> Self
pub fn dynamic_property_raw( self, alias: impl Into<String>, raw_sql_segment: impl Into<String>, ) -> Self
pub fn filter(self, filter: Expr) -> Self
pub fn and_filter(self, filter: Expr) -> Self
pub fn or_filter(self, filter: Expr) -> Self
pub fn having(self, having: Expr) -> Self
pub fn and_having(self, having: Expr) -> Self
pub fn or_having(self, having: Expr) -> Self
pub fn order_by(self, order: OrderBy) -> Self
pub fn order_asc(self, field: impl Into<String>) -> Self
pub fn order_desc(self, field: impl Into<String>) -> Self
pub fn order_expr_asc(self, expr: Expr) -> Self
pub fn order_expr_desc(self, expr: Expr) -> Self
pub fn order_gbk_asc(self, field: impl Into<String>) -> Self
pub fn order_gbk_desc(self, field: impl Into<String>) -> Self
pub fn group_by(self, field: impl Into<String>) -> Self
pub fn aggregate(self, aggregate: Aggregate) -> Self
pub fn count(self, alias: impl Into<String>) -> Self
pub fn count_field( self, field: impl Into<String>, alias: impl Into<String>, ) -> Self
pub fn sum(self, field: impl Into<String>, alias: impl Into<String>) -> Self
pub fn avg(self, field: impl Into<String>, alias: impl Into<String>) -> Self
pub fn min(self, field: impl Into<String>, alias: impl Into<String>) -> Self
pub fn max(self, field: impl Into<String>, alias: impl Into<String>) -> Self
pub fn stddev(self, field: impl Into<String>, alias: impl Into<String>) -> Self
pub fn stddev_pop( self, field: impl Into<String>, alias: impl Into<String>, ) -> Self
pub fn var_samp( self, field: impl Into<String>, alias: impl Into<String>, ) -> Self
pub fn var_pop(self, field: impl Into<String>, alias: impl Into<String>) -> Self
pub fn bit_and(self, field: impl Into<String>, alias: impl Into<String>) -> Self
pub fn bit_or(self, field: impl Into<String>, alias: impl Into<String>) -> Self
pub fn bit_xor(self, field: impl Into<String>, alias: impl Into<String>) -> Self
pub fn enable_aggregation_cache(self) -> Self
pub fn enable_aggregation_cache_for(self, cache_expired_millis: u64) -> Self
pub fn propagate_aggregation_cache(self, cache_expired_millis: u64) -> Self
pub fn comment(self, comment: impl Into<String>) -> Self
pub fn raw_sql(self, raw_sql: impl Into<String>) -> Self
pub fn raw_sql_search_criteria(self, raw_sql: impl Into<String>) -> Self
pub fn object_group_by( self, property_name: impl Into<String>, storage_field: impl Into<String>, query: SelectQuery, ) -> Self
pub fn child_enhancement(self, query: SelectQuery) -> Self
pub fn relation(self, name: impl Into<String>) -> Self
pub fn relation_query(self, name: impl Into<String>, query: SelectQuery) -> Self
pub fn limit(self, limit: u64) -> Self
pub fn offset(self, offset: u64) -> Self
pub fn page(self, offset: u64, limit: u64) -> Self
Trait Implementations§
Source§impl Clone for SelectQuery
impl Clone for SelectQuery
Source§fn clone(&self) -> SelectQuery
fn clone(&self) -> SelectQuery
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SelectQuery
impl Debug for SelectQuery
Source§impl PartialEq for SelectQuery
impl PartialEq for SelectQuery
Source§fn eq(&self, other: &SelectQuery) -> bool
fn eq(&self, other: &SelectQuery) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SelectQuery
Auto Trait Implementations§
impl Freeze for SelectQuery
impl RefUnwindSafe for SelectQuery
impl Send for SelectQuery
impl Sync for SelectQuery
impl Unpin for SelectQuery
impl UnsafeUnpin for SelectQuery
impl UnwindSafe for SelectQuery
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more