pub trait SqlConnection: SqlExecutor {
// Required method
fn sql_transaction(
&mut self,
) -> Result<impl SqlTransaction<Error = Self::Error> + '_, Self::Error>;
}
Expand description
Defines an implementation of a sqlite connection from which we can create an SqlTransaction
.
Required Methods§
Sourcefn sql_transaction(
&mut self,
) -> Result<impl SqlTransaction<Error = Self::Error> + '_, Self::Error>
fn sql_transaction( &mut self, ) -> Result<impl SqlTransaction<Error = Self::Error> + '_, Self::Error>
Create a new transaction for the connection.
§Errors
Should return an error if the transaction can’t be created.
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.