Skip to main content

Clause

Struct Clause 

Source
pub struct Clause<'q, T> { /* private fields */ }

Implementations§

Source§

impl<'q, T> Clause<'q, T>

Source

pub fn this(self) -> Self

Source

pub fn into<C>(self) -> Clause<'q, C>

Force convert clause type

Source

pub fn combine_raw( self, raw_sql: &str, params: &[&'q (dyn ToSql + Sync)], ) -> Self

Source

pub fn union<C>(self, clause: Clause<'q, C>) -> Clause<'q, ()>

Source

pub fn union_all<C>(self, clause: Clause<'q, C>) -> Clause<'q, ()>

Source

pub fn debug(self) -> Self

This method will call println!("{:?}", &self) to show temporary SQL result

Source§

impl<'q> Clause<'q, Condition>

Source

pub fn cast(self, sql_type: &str) -> Clause<'q, Condition>

Source

pub fn and_col(self, column: &str) -> Clause<'q, Column>

Source

pub fn or_col(self, column: &str) -> Clause<'q, Column>

Source

pub fn and_cond(self, cond: Clause<'q, Condition>) -> Clause<'q, Condition>

Source

pub fn or_cond(self, cond: Clause<'q, Condition>) -> Clause<'q, Condition>

Source§

impl<'q> Clause<'q, Delete>

Source

pub fn where_col( self, column: &str, value: Clause<'q, Condition>, ) -> Clause<'q, DeleteWhere>

Source

pub fn where_cond(self, cond: Clause<'q, Condition>) -> Clause<'q, DeleteWhere>

Source§

impl<'q> Clause<'q, DeleteWhere>

Source

pub fn and(self, condition: Clause<'q, Condition>) -> Clause<'q, DeleteWhere>

Source

pub fn or(self, condition: Clause<'q, Condition>) -> Clause<'q, DeleteWhere>

Source§

impl<'q> Clause<'q, Insert>

Source

pub fn on_conflict_do_nothing(self) -> Clause<'q, ()>

Source

pub fn on_conflict(self, cols: Clause<'q, Column>) -> OnConflictHandle<'q>

Source§

impl<'q> Clause<'q, Where>

Source

pub fn group_by_cols(self, columns: &[&str]) -> Clause<'q, Group>

Source

pub fn group_by<C>(self, group: Clause<'_, C>) -> Clause<'q, Group>

Source

pub fn limit(self, limit: &'q i64) -> Clause<'q, Paging>

Source

pub fn offset(self, offset: &'q i64) -> Clause<'q, Paging>

Source§

impl<'q> Clause<'q, Paging>

Source

pub fn limit(self, limit: &'q i64) -> Clause<'q, ()>

Source

pub fn offset(self, offset: &'q i64) -> Clause<'q, ()>

Source§

impl<'q> Clause<'q, Group>

Source

pub fn order_by_cols(self, columns: &[&str]) -> Clause<'q, Order>

Source

pub fn limit(self, limit: &'q i64) -> Clause<'q, Paging>

Source

pub fn offset(self, offset: &'q i64) -> Clause<'q, Paging>

Source§

impl<'q> Clause<'q, Order>

Source

pub fn limit(self, limit: &'q i64) -> Clause<'q, Paging>

Source

pub fn offset(self, offset: &'q i64) -> Clause<'q, Paging>

Source§

impl<'q> Clause<'q, Select>

Source

pub fn select<T>(self, clause: Clause<'q, T>) -> Clause<'q, Select>

Add more column in SELECT statement

§Arguments
  • clause:

returns: Clause