DatabaseDriver

Trait DatabaseDriver 

Source
pub trait DatabaseDriver:
    Debug
    + Sync
    + Send
    + 'static {
    // Required methods
    fn connection(&self) -> DatabaseConnection;
    fn configure<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn checkpoint<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Trait for database drivers in the simulation environment.

Required Methods§

Source

fn connection(&self) -> DatabaseConnection

Returns the database connection for the driver.

Source

fn configure<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Configure the database connection parameters. See corresponding driver implementation for details.

Source

fn checkpoint<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Checkpointing allows the driver to perform any necessary operations at designated points determined by the calling code.

Implementors§