Trait akita::BaseMapper[][src]

pub trait BaseMapper {
    type Item;
    fn insert<I, M: AkitaMapper>(
        &self,
        entity_manager: &mut M
    ) -> Result<Option<I>, AkitaError>
    where
        Self::Item: GetTableName + GetFields,
        I: FromValue
;
fn insert_batch<I, M: AkitaMapper>(
        datas: &[&Self::Item],
        entity_manager: &mut M
    ) -> Result<Vec<Option<I>>, AkitaError>
    where
        Self::Item: GetTableName + GetFields,
        I: FromValue
;
fn update<M: AkitaMapper>(
        &self,
        wrapper: Wrapper,
        entity_manager: &mut M
    ) -> Result<(), AkitaError>
    where
        Self::Item: GetTableName + GetFields
;
fn list<M: AkitaMapper>(
        wrapper: Wrapper,
        entity_manager: &mut M
    ) -> Result<Vec<Self::Item>, AkitaError>
    where
        Self::Item: GetTableName + GetFields + FromValue
;
fn page<M: AkitaMapper>(
        page: usize,
        size: usize,
        wrapper: Wrapper,
        entity_manager: &mut M
    ) -> Result<IPage<Self::Item>, AkitaError>
    where
        Self::Item: GetTableName + GetFields + FromValue
;
fn find_one<M: AkitaMapper>(
        wrapper: Wrapper,
        entity_manager: &mut M
    ) -> Result<Option<Self::Item>, AkitaError>
    where
        Self::Item: GetTableName + GetFields + FromValue
;
fn find_by_id<I: ToValue, M: AkitaMapper>(
        &self,
        entity_manager: &mut M,
        id: I
    ) -> Result<Option<Self::Item>, AkitaError>
    where
        Self::Item: GetTableName + GetFields + FromValue
;
fn update_by_id<M: AkitaMapper>(
        &self,
        entity_manager: &mut M
    ) -> Result<(), AkitaError>
    where
        Self::Item: GetFields + GetTableName + ToValue
;
fn delete<M: AkitaMapper>(
        &self,
        wrapper: Wrapper,
        entity_manager: &mut M
    ) -> Result<(), AkitaError>
    where
        Self::Item: GetFields + GetTableName + ToValue
;
fn delete_by_id<I: ToValue, M: AkitaMapper>(
        &self,
        entity_manager: &mut M,
        id: I
    ) -> Result<(), AkitaError>
    where
        Self::Item: GetFields + GetTableName + ToValue
;
fn count<M: AkitaMapper>(
        &mut self,
        wrapper: Wrapper,
        entity_manager: &mut M
    ) -> Result<usize, AkitaError>; }

Associated Types

Required methods

Insert Data.

Insert Data Batch.

Update Data With Wrapper.

Find One With Wrapper.

Find Data With Table’s Ident.

Update Data With Table’s Ident.

Delete Data With Wrapper.

Delete Data With Table’s Ident.

Get the Table Count.

Implementors