Trait butane::prelude::BackendConnection
source · pub trait BackendConnection: ConnectionMethods + Debug + Send + 'static {
// Required methods
fn transaction(&mut self) -> Result<Transaction<'_>, Error>;
fn backend(&self) -> Box<dyn Backend + 'static, Global>;
fn backend_name(&self) -> &'static str;
fn is_closed(&self) -> bool;
}
Expand description
Database connection.
Required Methods§
sourcefn transaction(&mut self) -> Result<Transaction<'_>, Error>
fn transaction(&mut self) -> Result<Transaction<'_>, Error>
Begin a database transaction. The transaction object must be used in place of this connection until it is committed and aborted.
sourcefn backend(&self) -> Box<dyn Backend + 'static, Global>
fn backend(&self) -> Box<dyn Backend + 'static, Global>
Retrieve the backend backend this connection