pub struct AdvancedQueryBuilder { /* private fields */ }Expand description
Advanced Query Builder with JOIN support
Implementations§
Source§impl AdvancedQueryBuilder
impl AdvancedQueryBuilder
Sourcepub fn join(self, join_type: JoinType, table: &str, on_condition: &str) -> Self
pub fn join(self, join_type: JoinType, table: &str, on_condition: &str) -> Self
Add a JOIN clause
Sourcepub fn join_alias(
self,
join_type: JoinType,
table: &str,
alias: &str,
on_condition: &str,
) -> Self
pub fn join_alias( self, join_type: JoinType, table: &str, alias: &str, on_condition: &str, ) -> Self
Add a JOIN clause with alias
Sourcepub fn where_raw(self, condition: &str, param: QueryValue) -> Self
pub fn where_raw(self, condition: &str, param: QueryValue) -> Self
Add WHERE condition (raw SQL)
Sourcepub fn having(self, condition: &str, param: QueryValue) -> Self
pub fn having(self, condition: &str, param: QueryValue) -> Self
Add HAVING condition
Sourcepub fn window_fn(
self,
expression: &str,
alias: &str,
partition_by: &[&str],
order_by: &[&str],
) -> Self
pub fn window_fn( self, expression: &str, alias: &str, partition_by: &[&str], order_by: &[&str], ) -> Self
Add a window function
Sourcepub fn window_fn_with_frame(
self,
expression: &str,
alias: &str,
partition_by: &[&str],
order_by: &[&str],
frame: &str,
) -> Self
pub fn window_fn_with_frame( self, expression: &str, alias: &str, partition_by: &[&str], order_by: &[&str], frame: &str, ) -> Self
Add window function with frame clause
Sourcepub fn build_sql(&self) -> (String, Vec<QueryValue>)
pub fn build_sql(&self) -> (String, Vec<QueryValue>)
Build the complete SQL query
Auto Trait Implementations§
impl Freeze for AdvancedQueryBuilder
impl RefUnwindSafe for AdvancedQueryBuilder
impl Send for AdvancedQueryBuilder
impl Sync for AdvancedQueryBuilder
impl Unpin for AdvancedQueryBuilder
impl UnsafeUnpin for AdvancedQueryBuilder
impl UnwindSafe for AdvancedQueryBuilder
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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