pub struct SelectDyn<Cols, From> { /* private fields */ }Expand description
A dynamic SELECT statement builder using string-based column names.
For compile-time validated queries, use Select from builder::typed.
Uses the typestate pattern to ensure that:
build()is only available when both columns and FROM are specifiedwhere_clause()is only available after FROM is specifiedgroup_by(),having(),order_by()follow SQL semantics
Implementations§
Source§impl<Cols> SelectDyn<Cols, HasFrom>
impl<Cols> SelectDyn<Cols, HasFrom>
Sourcepub fn where_clause(self, expr: ExprBuilder) -> Self
pub fn where_clause(self, expr: ExprBuilder) -> Self
Adds a WHERE clause.
Sourcepub fn right_join(self, table: &str, on: &str) -> Self
pub fn right_join(self, table: &str, on: &str) -> Self
Adds a RIGHT JOIN.
Sourcepub fn cross_join(self, table: &str) -> Self
pub fn cross_join(self, table: &str) -> Self
Adds a CROSS JOIN.
Source§impl SelectDyn<HasColumns, HasFrom>
impl SelectDyn<HasColumns, HasFrom>
Trait Implementations§
Auto Trait Implementations§
impl<Cols, From> Freeze for SelectDyn<Cols, From>
impl<Cols, From> RefUnwindSafe for SelectDyn<Cols, From>where
Cols: RefUnwindSafe,
From: RefUnwindSafe,
impl<Cols, From> Send for SelectDyn<Cols, From>
impl<Cols, From> Sync for SelectDyn<Cols, From>
impl<Cols, From> Unpin for SelectDyn<Cols, From>
impl<Cols, From> UnwindSafe for SelectDyn<Cols, From>where
Cols: UnwindSafe,
From: UnwindSafe,
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