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§
Sourcefn commit_transaction(&mut self) -> Result<()>
fn commit_transaction(&mut self) -> Result<()>
Commits the current transaction.
Sourcefn create_batch(&mut self) -> Result<Box<dyn Batch>>
fn create_batch(&mut self) -> Result<Box<dyn Batch>>
Creates a new Batch instance for building a batched request.
Sourcefn create_savepoint(&mut self, name: &str) -> Result<Box<Self>>
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
Sourcefn release_savepoint(&mut self, name: &str)
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
Sourcefn rollback_transaction(&mut self) -> Result<()>
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.