pub struct UpdateBuilder { /* private fields */ }Expand description
Implementations§
Source§impl UpdateBuilder
impl UpdateBuilder
Sourcepub fn set(self, column: &str, value: Expr) -> Self
pub fn set(self, column: &str, value: Expr) -> Self
Add a SET column = value assignment.
Call this method multiple times to set multiple columns.
Sourcepub fn where_(self, condition: Expr) -> Self
pub fn where_(self, condition: Expr) -> Self
Set the WHERE clause to restrict which rows are updated.
Sourcepub fn from(self, table_name: &str) -> Self
pub fn from(self, table_name: &str) -> Self
Set the FROM clause for PostgreSQL/Snowflake-style UPDATE ... FROM ... syntax.
This allows joining against other tables within the UPDATE statement.
Sourcepub fn build(self) -> Expression
pub fn build(self) -> Expression
Consume this builder and produce the final Expression::Update AST node.
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