pub struct UpdateBuilder { /* private fields */ }Expand description
Builder for UPDATE statements.
Implementations§
Source§impl UpdateBuilder
impl UpdateBuilder
Sourcepub fn table(self, qi: &QualifiedIdentifier) -> Self
pub fn table(self, qi: &QualifiedIdentifier) -> Self
Set the target table.
Sourcepub fn table_as(self, qi: &QualifiedIdentifier, alias: &str) -> Self
pub fn table_as(self, qi: &QualifiedIdentifier, alias: &str) -> Self
Set the target table with alias.
Sourcepub fn set<V: Into<SqlParam>>(self, column: &str, value: V) -> Self
pub fn set<V: Into<SqlParam>>(self, column: &str, value: V) -> Self
Add a SET clause with parameterized value.
Sourcepub fn set_raw(self, column: &str, value: SqlFragment) -> Self
pub fn set_raw(self, column: &str, value: SqlFragment) -> Self
Add a SET clause with raw SQL.
Sourcepub fn where_expr(self, expr: Expr) -> Self
pub fn where_expr(self, expr: Expr) -> Self
Add a WHERE clause.
Sourcepub fn where_raw(self, sql: SqlFragment) -> Self
pub fn where_raw(self, sql: SqlFragment) -> Self
Add a raw WHERE clause.
Sourcepub fn returning_all(self) -> Self
pub fn returning_all(self) -> Self
Add RETURNING * clause.
Sourcepub fn build(self) -> SqlFragment
pub fn build(self) -> SqlFragment
Build the UPDATE statement.
Trait Implementations§
Source§impl Clone for UpdateBuilder
impl Clone for UpdateBuilder
Source§fn clone(&self) -> UpdateBuilder
fn clone(&self) -> UpdateBuilder
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 moreSource§impl Debug for UpdateBuilder
impl Debug for UpdateBuilder
Source§impl Default for UpdateBuilder
impl Default for UpdateBuilder
Source§fn default() -> UpdateBuilder
fn default() -> UpdateBuilder
Returns the “default value” for a type. Read more
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