pub trait Update<'until_build, 'post_build> {
// Required methods
fn rollback_transaction(self) -> Self;
fn where_clause(
self,
condition: &'until_build Condition<'post_build>,
) -> Self;
fn add_update(
self,
column_name: &'until_build str,
column_value: Value<'post_build>,
) -> Self;
fn build(self) -> Result<(String, Vec<Value<'post_build>>), Error>;
}
Expand description
Trait representing a update builder.
Required Methods§
Sourcefn rollback_transaction(self) -> Self
fn rollback_transaction(self) -> Self
Turns on ROLLBACK mode.
Only useful in case of an active transaction.
If the insert fails, the complete transaction will be rolled back. The default case is to just stop the transaction, but not rollback any prior successful executed queries.
Sourcefn where_clause(self, condition: &'until_build Condition<'post_build>) -> Self
fn where_clause(self, condition: &'until_build Condition<'post_build>) -> Self
Adds a Condition to the update query.
Sourcefn add_update(
self,
column_name: &'until_build str,
column_value: Value<'post_build>,
) -> Self
fn add_update( self, column_name: &'until_build str, column_value: Value<'post_build>, ) -> Self
Add an update
Parameter:
column_name
: The column name to set the value to.column_value
: The value to set the column to.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.