pub struct Query { /* private fields */ }Implementations§
Source§impl Query
impl Query
pub fn new() -> Query
pub fn with_distinct(self) -> Self
pub fn with_table(self, table: &str, alias: Option<String>) -> Self
pub fn with_with(self, alias: &str, subquery: Query) -> Self
pub fn with_source(self, source: QuerySource) -> Self
pub fn with_skip(self, skip: i64) -> Self
pub fn with_limit(self, limit: i64) -> Self
pub fn with_skip_and_limit(self, skip: i64, limit: i64) -> Self
pub fn with_type(self, query_type: QueryType) -> Self
pub fn without_fields(self) -> Self
pub fn with_field(self, name: String, field: impl SqlField + 'static) -> Self
pub fn with_column_field(self, name: &str) -> Self
pub fn with_field_arc(self, name: String, field: Arc<Box<dyn SqlField>>) -> Self
pub fn with_where_condition(self, cond: Expression) -> Self
pub fn with_having_condition(self, cond: Expression) -> Self
pub fn with_join(self, join: JoinQuery) -> Self
pub fn with_condition(self, cond: impl Chunk + 'static) -> Self
pub fn with_condition_arc(self, cond: Arc<Box<dyn Chunk>>) -> Self
pub fn with_group_by(self, group_by: Expression) -> Self
pub fn with_order_by(self, order_by: Expression) -> Self
pub fn with_set_field(self, field: &str, value: Value) -> Self
pub fn preview(&self) -> String
Trait Implementations§
Source§impl Chunk for Query
impl Chunk for Query
Source§fn render_chunk(&self) -> Expression
fn render_chunk(&self) -> Expression
Generates an SQL statement. Read more
Source§impl SqlQuery for Query
impl SqlQuery for Query
fn set_distinct(&mut self, distinct: bool)
fn set_table(&mut self, table: &str, alias: Option<String>)
fn add_with(&mut self, alias: String, subquery: QuerySource)
fn set_source(&mut self, source: QuerySource)
fn set_type(&mut self, query_type: QueryType)
fn add_field(&mut self, name: Option<String>, field: Arc<Box<dyn SqlField>>)
fn get_where_conditions_mut(&mut self) -> &mut QueryConditions
fn get_having_conditions_mut(&mut self) -> &mut QueryConditions
fn add_join(&mut self, join: JoinQuery)
fn add_group_by(&mut self, group_by: Expression)
fn add_order_by(&mut self, order_by: Expression)
fn add_limit(&mut self, limit: Option<i64>)
fn add_skip(&mut self, skip: Option<i64>)
fn set_field_value(&mut self, field: &str, value: Value)
Auto Trait Implementations§
impl Freeze for Query
impl !RefUnwindSafe for Query
impl Send for Query
impl Sync for Query
impl Unpin for Query
impl UnsafeUnpin for Query
impl !UnwindSafe for Query
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more