pub trait RelationalTx: Send {
// Required methods
fn execute(
&mut self,
sql: &str,
params: &[Value],
) -> impl Future<Output = Result<u64, RelError>> + Send;
fn query(
&mut self,
sql: &str,
params: &[Value],
) -> impl Future<Output = Result<Vec<Row>, RelError>> + Send;
fn commit(self) -> impl Future<Output = Result<(), RelError>> + Send;
fn rollback(self) -> impl Future<Output = Result<(), RelError>> + Send;
}Expand description
A transaction. Statements run inside it are committed or rolled back together.
Required Methods§
Sourcefn execute(
&mut self,
sql: &str,
params: &[Value],
) -> impl Future<Output = Result<u64, RelError>> + Send
fn execute( &mut self, sql: &str, params: &[Value], ) -> impl Future<Output = Result<u64, RelError>> + Send
As RelationalBackend::execute, inside the transaction.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".