Struct photon_indexer::migration::sea_orm::MockDatabaseConnection
source · pub struct MockDatabaseConnection { /* private fields */ }Expand description
Defines a connection for the MockDatabase
Implementations§
source§impl MockDatabaseConnection
impl MockDatabaseConnection
sourcepub fn new<M>(m: M) -> MockDatabaseConnectionwhere
M: 'static + MockDatabaseTrait,
pub fn new<M>(m: M) -> MockDatabaseConnectionwhere
M: 'static + MockDatabaseTrait,
Create a connection to the MockDatabase
sourcepub fn get_database_backend(&self) -> DatabaseBackend
pub fn get_database_backend(&self) -> DatabaseBackend
Get the DatabaseBackend being used by the MockDatabase
sourcepub fn execute(&self, statement: Statement) -> Result<ExecResult, DbErr>
pub fn execute(&self, statement: Statement) -> Result<ExecResult, DbErr>
Execute the SQL statement in the MockDatabase
sourcepub fn query_one(
&self,
statement: Statement
) -> Result<Option<QueryResult>, DbErr>
pub fn query_one( &self, statement: Statement ) -> Result<Option<QueryResult>, DbErr>
Return one QueryResult if the query was successful
sourcepub fn query_all(&self, statement: Statement) -> Result<Vec<QueryResult>, DbErr>
pub fn query_all(&self, statement: Statement) -> Result<Vec<QueryResult>, DbErr>
Return all QueryResults if the query was successful
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for MockDatabaseConnection
impl RefUnwindSafe for MockDatabaseConnection
impl Send for MockDatabaseConnection
impl Sync for MockDatabaseConnection
impl Unpin for MockDatabaseConnection
impl UnwindSafe for MockDatabaseConnection
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more