Trait sea_orm::MockDatabaseTrait
source · [−]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>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
;
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
Commit a successful transaction atomically into the MockDatabase
fn drain_transaction_log(&mut self) -> Vec<Transaction>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn drain_transaction_log(&mut self) -> Vec<Transaction>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Get all logs from a MockDatabase and return a Transaction
fn get_database_backend(&self) -> DbBackend
fn get_database_backend(&self) -> DbBackend
Get the backend being used in the MockDatabase