Trait rorm_sql::update::Update

source ·
pub trait Update<'until_build, 'post_build> {
    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

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.

Adds a Condition to the update query.

Add an update

Parameter:

  • column_name: The column name to set the value to.
  • column_value: The value to set the column to.

Builds the given statement.

The query_string as well a list of values to bind are returned.

This function returns an error, if no update statements are given previously.

Implementors