pub struct SQLSelectBuilder {
pub columns: Vec<String>,
pub from: Option<String>,
pub joins: Vec<SQLJoin>,
pub where_clause: Option<String>,
pub group_by: Vec<String>,
pub having: Option<String>,
pub order_by: Vec<(String, bool)>,
pub limit: Option<u64>,
pub offset: Option<u64>,
pub distinct: bool,
}Fields§
§columns: Vec<String>§from: Option<String>§joins: Vec<SQLJoin>§where_clause: Option<String>§group_by: Vec<String>§having: Option<String>§order_by: Vec<(String, bool)>§limit: Option<u64>§offset: Option<u64>§distinct: boolImplementations§
Source§impl SQLSelectBuilder
impl SQLSelectBuilder
pub fn new() -> Self
pub fn column(self, col: impl Into<String>) -> Self
pub fn from_table(self, table: impl Into<String>) -> Self
pub fn join(self, j: SQLJoin) -> Self
pub fn where_cond(self, cond: impl Into<String>) -> Self
pub fn group_by(self, col: impl Into<String>) -> Self
pub fn order_asc(self, col: impl Into<String>) -> Self
pub fn order_desc(self, col: impl Into<String>) -> Self
pub fn limit(self, n: u64) -> Self
pub fn offset(self, n: u64) -> Self
pub fn distinct(self) -> Self
pub fn build(&self) -> String
Trait Implementations§
Source§impl Clone for SQLSelectBuilder
impl Clone for SQLSelectBuilder
Source§fn clone(&self) -> SQLSelectBuilder
fn clone(&self) -> SQLSelectBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SQLSelectBuilder
impl RefUnwindSafe for SQLSelectBuilder
impl Send for SQLSelectBuilder
impl Sync for SQLSelectBuilder
impl Unpin for SQLSelectBuilder
impl UnsafeUnpin for SQLSelectBuilder
impl UnwindSafe for SQLSelectBuilder
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