Trait Insert

Source
pub trait Insert<'post_build> {
    // Required methods
    fn rollback_transaction(self) -> Self;
    fn build(self) -> (String, Vec<Value<'post_build>>);
}
Expand description

Trait representing a insert builder.

Required Methods§

Source

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.

Source

fn build(self) -> (String, Vec<Value<'post_build>>)

This method is used to build the INSERT query. It returns the build query as well as a vector of values to bind to it.

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.

Implementors§

Source§

impl<'post_build> Insert<'post_build> for InsertImpl<'_, 'post_build>