pub struct UpdateBuilder { /* private fields */ }Implementations§
Source§impl UpdateBuilder
impl UpdateBuilder
pub fn new() -> Self
pub fn set_flavor(&mut self, flavor: Flavor) -> Flavor
pub fn flavor(&self) -> Flavor
pub fn with(&mut self, cte: &CTEBuilder) -> &mut Self
pub fn where_clause(&self) -> Option<WhereClauseRef>
pub fn set_where_clause(&mut self, wc: Option<WhereClauseRef>) -> &mut Self
pub fn clear_where_clause(&mut self) -> &mut Self
pub fn clone_builder(&self) -> Self
pub fn update( &mut self, tables: impl IntoIterator<Item = impl Into<String>>, ) -> &mut Self
pub fn set( &mut self, assignments: impl IntoIterator<Item = impl Into<String>>, ) -> &mut Self
pub fn set_more( &mut self, assignments: impl IntoIterator<Item = impl Into<String>>, ) -> &mut Self
pub fn where_( &mut self, and_expr: impl IntoIterator<Item = impl Into<String>>, ) -> &mut Self
pub fn add_where_expr( &mut self, args: ArgsRef, exprs: impl IntoIterator<Item = impl Into<String>>, ) -> &mut Self
pub fn add_where_clause(&mut self, other: &WhereClause) -> &mut Self
pub fn add_where_clause_ref(&mut self, other: &WhereClauseRef) -> &mut Self
pub fn assign(&self, field: &str, value: impl Into<Arg>) -> String
pub fn incr(&self, field: &str) -> String
pub fn decr(&self, field: &str) -> String
pub fn add_(&self, field: &str, value: impl Into<Arg>) -> String
Sourcepub fn add(&self, field: &str, value: impl Into<Arg>) -> String
pub fn add(&self, field: &str, value: impl Into<Arg>) -> String
Add:对齐 go-sqlbuilder UpdateBuilder.Add。
pub fn sub(&self, field: &str, value: impl Into<Arg>) -> String
pub fn mul(&self, field: &str, value: impl Into<Arg>) -> String
pub fn div(&self, field: &str, value: impl Into<Arg>) -> String
pub fn order_by( &mut self, cols: impl IntoIterator<Item = impl Into<String>>, ) -> &mut Self
pub fn order_by_asc(&mut self, col: impl Into<String>) -> &mut Self
pub fn order_by_desc(&mut self, col: impl Into<String>) -> &mut Self
pub fn asc(&mut self) -> &mut Self
pub fn desc(&mut self) -> &mut Self
pub fn limit(&mut self, limit: i64) -> &mut Self
pub fn returning( &mut self, cols: impl IntoIterator<Item = impl Into<String>>, ) -> &mut Self
Sourcepub fn num_assignment(&self) -> usize
pub fn num_assignment(&self) -> usize
NumAssignment:对齐 go-sqlbuilder UpdateBuilder.NumAssignment()。
pub fn sql(&mut self, sql: impl Into<String>) -> &mut Self
Methods from Deref<Target = Cond>§
pub fn equal(&self, field: &str, value: impl Into<Arg>) -> String
pub fn e(&self, field: &str, value: impl Into<Arg>) -> String
pub fn eq(&self, field: &str, value: impl Into<Arg>) -> String
pub fn not_equal(&self, field: &str, value: impl Into<Arg>) -> String
pub fn ne(&self, field: &str, value: impl Into<Arg>) -> String
pub fn neq(&self, field: &str, value: impl Into<Arg>) -> String
pub fn greater_than(&self, field: &str, value: impl Into<Arg>) -> String
pub fn g(&self, field: &str, value: impl Into<Arg>) -> String
pub fn gt(&self, field: &str, value: impl Into<Arg>) -> String
pub fn greater_equal_than(&self, field: &str, value: impl Into<Arg>) -> String
pub fn ge(&self, field: &str, value: impl Into<Arg>) -> String
pub fn gte(&self, field: &str, value: impl Into<Arg>) -> String
pub fn less_than(&self, field: &str, value: impl Into<Arg>) -> String
pub fn l(&self, field: &str, value: impl Into<Arg>) -> String
pub fn lt(&self, field: &str, value: impl Into<Arg>) -> String
pub fn less_equal_than(&self, field: &str, value: impl Into<Arg>) -> String
pub fn le(&self, field: &str, value: impl Into<Arg>) -> String
pub fn lte(&self, field: &str, value: impl Into<Arg>) -> String
pub fn like(&self, field: &str, value: impl Into<Arg>) -> String
pub fn ilike(&self, field: &str, value: impl Into<Arg>) -> String
pub fn not_like(&self, field: &str, value: impl Into<Arg>) -> String
pub fn not_ilike(&self, field: &str, value: impl Into<Arg>) -> String
pub fn is_null(&self, field: &str) -> String
pub fn is_not_null(&self, field: &str) -> String
pub fn between( &self, field: &str, lower: impl Into<Arg>, upper: impl Into<Arg>, ) -> String
pub fn not_between( &self, field: &str, lower: impl Into<Arg>, upper: impl Into<Arg>, ) -> String
pub fn in_( &self, field: &str, values: impl IntoIterator<Item = impl Into<Arg>>, ) -> String
pub fn not_in( &self, field: &str, values: impl IntoIterator<Item = impl Into<Arg>>, ) -> String
pub fn or(&self, exprs: impl IntoIterator<Item = impl Into<String>>) -> String
pub fn and(&self, exprs: impl IntoIterator<Item = impl Into<String>>) -> String
pub fn not(&self, expr: impl Into<String>) -> String
pub fn exists(&self, subquery: impl Into<Arg>) -> String
pub fn not_exists(&self, subquery: impl Into<Arg>) -> String
pub fn any( &self, field: &str, op: &str, values: impl IntoIterator<Item = impl Into<Arg>>, ) -> String
pub fn all( &self, field: &str, op: &str, values: impl IntoIterator<Item = impl Into<Arg>>, ) -> String
pub fn some( &self, field: &str, op: &str, values: impl IntoIterator<Item = impl Into<Arg>>, ) -> String
pub fn is_distinct_from(&self, field: &str, value: impl Into<Arg>) -> String
pub fn is_not_distinct_from(&self, field: &str, value: impl Into<Arg>) -> String
Trait Implementations§
Source§impl Builder for UpdateBuilder
impl Builder for UpdateBuilder
Source§impl Clone for UpdateBuilder
impl Clone for UpdateBuilder
Source§impl Debug for UpdateBuilder
impl Debug for UpdateBuilder
Source§impl Default for UpdateBuilder
impl Default for UpdateBuilder
Auto Trait Implementations§
impl Freeze for UpdateBuilder
impl !RefUnwindSafe for UpdateBuilder
impl !Send for UpdateBuilder
impl !Sync for UpdateBuilder
impl Unpin for UpdateBuilder
impl !UnwindSafe for UpdateBuilder
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