pub trait MockDatabaseTrait: Send + Debug {
    fn execute(
        &mut self,
        counter: usize,
        stmt: Statement
    ) -> Result<ExecResult, DbErr>; fn query(
        &mut self,
        counter: usize,
        stmt: Statement
    ) -> Result<Vec<QueryResult>, DbErr>; fn begin(&mut self); fn commit(&mut self); fn rollback(&mut self); fn drain_transaction_log(&mut self) -> Vec<Transaction> ; fn get_database_backend(&self) -> DbBackend; }
Expand description

A Trait for any type wanting to perform operations on the MockDatabase

Required Methods§

Execute a statement in the MockDatabase

Execute a SQL query in the MockDatabase

Create a transaction that can be committed atomically

Commit a successful transaction atomically into the MockDatabase

Roll back a transaction since errors were encountered

Get all logs from a MockDatabase and return a Transaction

Get the backend being used in the MockDatabase

Implementors§