pub struct MemoryAdapter { /* private fields */ }Implementations§
Trait Implementations§
Source§impl Adapter for MemoryAdapter
impl Adapter for MemoryAdapter
type Tx = MemoryTx
async fn begin(&self) -> DbResult<MemoryTx>
Source§async fn introspect(&self) -> DbResult<LiveSchema>
async fn introspect(&self) -> DbResult<LiveSchema>
Reads the live schema for the migrator. Adapters without DDL return
Unsupported.Source§async fn apply(&self, plan: &MigrationPlan) -> DbResult<()>
async fn apply(&self, plan: &MigrationPlan) -> DbResult<()>
Applies a migration plan computed by the migrator.
Source§fn render_sql(&self, plan: &MigrationPlan) -> DbResult<String>
fn render_sql(&self, plan: &MigrationPlan) -> DbResult<String>
Renders a plan as SQL for
fastauth generate. Non-SQL adapters return Unsupported.Source§fn session_with_user(
&self,
q: SessionWithUser<'_>,
) -> impl Future<Output = DbResult<Option<(Row, Row)>>> + Send
fn session_with_user( &self, q: SessionWithUser<'_>, ) -> impl Future<Output = DbResult<Option<(Row, Row)>>> + Send
Session plus user in one call. The default does two lookups; SQL adapters override.
Source§impl Clone for MemoryAdapter
impl Clone for MemoryAdapter
Source§impl Debug for MemoryAdapter
impl Debug for MemoryAdapter
Source§impl Default for MemoryAdapter
impl Default for MemoryAdapter
Source§impl Queries for MemoryAdapter
impl Queries for MemoryAdapter
async fn insert(&self, q: Insert<'_>) -> DbResult<Row>
async fn find_one(&self, q: Select<'_>) -> DbResult<Option<Row>>
async fn find_many(&self, q: Select<'_>) -> DbResult<Vec<Row>>
async fn update(&self, q: Update<'_>) -> DbResult<u64>
async fn delete(&self, q: Delete<'_>) -> DbResult<u64>
async fn count(&self, q: Select<'_>) -> DbResult<u64>
Auto Trait Implementations§
impl Forget for MemoryAdapter
impl Freeze for MemoryAdapter
impl Move for MemoryAdapter
impl RefUnwindSafe for MemoryAdapter
impl Send for MemoryAdapter
impl Sync for MemoryAdapter
impl Unpin for MemoryAdapter
impl UnsafeUnpin for MemoryAdapter
impl UnwindSafe for MemoryAdapter
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