pub trait ProxyDatabaseTrait:
Send
+ Sync
+ Debug {
// Required methods
fn query<'life0, 'async_trait>(
&'life0 self,
statement: Statement,
) -> Pin<Box<dyn Future<Output = Result<Vec<ProxyRow>, DbErr>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn execute<'life0, 'async_trait>(
&'life0 self,
statement: Statement,
) -> Pin<Box<dyn Future<Output = Result<ProxyExecResult, DbErr>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn begin<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn commit<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn rollback<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn ping<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}
Available on crate feature
proxy
only.Expand description
Defines the ProxyDatabaseTrait to save the functions
Required Methods§
Provided Methods§
Sourcefn begin<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn begin<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Begin a transaction in the [ProxyDatabase]
Sourcefn commit<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn commit<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Commit a transaction in the [ProxyDatabase]