pub trait DatabaseClient: Send + Sync {
// Required methods
fn execute<'life0, 'async_trait>(
&'life0 self,
query: DatabaseQuery,
) -> Pin<Box<dyn Future<Output = AppResult<DatabaseResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn begin<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AppResult<Box<dyn DatabaseTransaction>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn ping<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AppResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Vendor-neutral database client.
Required Methods§
Sourcefn execute<'life0, 'async_trait>(
&'life0 self,
query: DatabaseQuery,
) -> Pin<Box<dyn Future<Output = AppResult<DatabaseResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
query: DatabaseQuery,
) -> Pin<Box<dyn Future<Output = AppResult<DatabaseResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute a statement.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".