Skip to main content

AsyncRepo

Trait AsyncRepo 

Source
pub trait AsyncRepo: Send + Sync {
    // Required methods
    fn adapter_kind(&self) -> AdapterKind;
    fn insert<'a>(
        &'a self,
        context: &'a AsyncQueryContext,
        table: &'a str,
        data: Row,
    ) -> AsyncRepoFuture<'a, StoredRow>;
    fn update<'a>(
        &'a self,
        context: &'a AsyncQueryContext,
        table: &'a str,
        id: u64,
        data: Row,
    ) -> AsyncRepoFuture<'a, StoredRow>;
    fn delete<'a>(
        &'a self,
        context: &'a AsyncQueryContext,
        table: &'a str,
        id: u64,
    ) -> AsyncRepoFuture<'a, ()>;
    fn find<'a>(
        &'a self,
        context: &'a AsyncQueryContext,
        table: &'a str,
        id: u64,
    ) -> AsyncRepoFuture<'a, Option<StoredRow>>;
    fn list<'a>(
        &'a self,
        context: &'a AsyncQueryContext,
        table: &'a str,
        query: &'a Query,
    ) -> AsyncRepoFuture<'a, Vec<StoredRow>>;
}

Required Methods§

Source

fn adapter_kind(&self) -> AdapterKind

Source

fn insert<'a>( &'a self, context: &'a AsyncQueryContext, table: &'a str, data: Row, ) -> AsyncRepoFuture<'a, StoredRow>

Source

fn update<'a>( &'a self, context: &'a AsyncQueryContext, table: &'a str, id: u64, data: Row, ) -> AsyncRepoFuture<'a, StoredRow>

Source

fn delete<'a>( &'a self, context: &'a AsyncQueryContext, table: &'a str, id: u64, ) -> AsyncRepoFuture<'a, ()>

Source

fn find<'a>( &'a self, context: &'a AsyncQueryContext, table: &'a str, id: u64, ) -> AsyncRepoFuture<'a, Option<StoredRow>>

Source

fn list<'a>( &'a self, context: &'a AsyncQueryContext, table: &'a str, query: &'a Query, ) -> AsyncRepoFuture<'a, Vec<StoredRow>>

Implementors§