pub struct InMemoryDatabase { /* private fields */ }Expand description
In-memory database backend for local development and tests.
Implementations§
Source§impl InMemoryDatabase
impl InMemoryDatabase
Sourcepub fn new(config: MemoryDatabaseConfig) -> Self
pub fn new(config: MemoryDatabaseConfig) -> Self
Create an in-memory database backend.
Sourcepub fn recorded_queries(&self) -> Vec<DatabaseQuery>
pub fn recorded_queries(&self) -> Vec<DatabaseQuery>
Return recorded statements retained by this backend.
Trait Implementations§
Source§impl Component for InMemoryDatabase
impl Component for InMemoryDatabase
Source§fn start<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AppResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AppResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Start the component. Read more
Source§impl DatabaseClient for InMemoryDatabase
impl DatabaseClient for InMemoryDatabase
Source§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 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.
Source§impl Debug for InMemoryDatabase
impl Debug for InMemoryDatabase
Auto Trait Implementations§
impl !Freeze for InMemoryDatabase
impl !RefUnwindSafe for InMemoryDatabase
impl Send for InMemoryDatabase
impl Sync for InMemoryDatabase
impl Unpin for InMemoryDatabase
impl UnsafeUnpin for InMemoryDatabase
impl UnwindSafe for InMemoryDatabase
Blanket Implementations§
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