Trait Transaction

Source
pub trait Transaction {
    // Required methods
    fn commit_transaction(&mut self) -> Result<()>;
    fn create_batch(&mut self) -> Result<Box<dyn Batch>>;
    fn create_savepoint(&mut self, name: &str) -> Result<Box<Self>>;
    fn release_savepoint(&mut self, name: &str);
    fn rollback_transaction(&mut self) -> Result<()>;
}

Required Methods§

Source

fn commit_transaction(&mut self) -> Result<()>

Commits the current transaction.

Source

fn create_batch(&mut self) -> Result<Box<dyn Batch>>

Creates a new Batch instance for building a batched request.

Source

fn create_savepoint(&mut self, name: &str) -> Result<Box<Self>>

Creates a savepoint in the current transaction. Arguments:

  • name: name the name of the savepoint to create.

UnsupportedOperationException if savepoints are not supported

Source

fn release_savepoint(&mut self, name: &str)

Releases a savepoint in the current transaction. Calling this for drivers not supporting savepoint release results in a no-op. Arguments:

  • name: the name of the savepoint to release
Source

fn rollback_transaction(&mut self) -> Result<()>

Rolls back the current transaction.

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§