Trait akita::BaseMapper [−][src]
pub trait BaseMapper { type Item;}Show methods
fn insert<'a, 'b, 'c>(
&self,
conn: ConnMut<'a, 'b, 'c>
) -> Result<Option<u64>, AkitaError>; fn update<'a, 'b, 'c>(
&self,
wrapper: &mut UpdateWrapper,
conn: ConnMut<'a, 'b, 'c>
) -> Result<bool, AkitaError>; fn list<'a, 'b, 'c, W: Wrapper>(
&self,
wrapper: &mut W,
conn: ConnMut<'a, 'b, 'c>
) -> Result<Vec<Self::Item>, AkitaError>
where
Self::Item: Clone; fn page<'a, 'b, 'c, W: Wrapper>(
&self,
page: usize,
size: usize,
wrapper: &mut W,
conn: ConnMut<'a, 'b, 'c>
) -> Result<IPage<Self::Item>, AkitaError>
where
Self::Item: Clone; fn find_one<'a, 'b, 'c, W: Wrapper>(
&self,
wrapper: &mut W,
conn: ConnMut<'a, 'b, 'c>
) -> Result<Option<Self::Item>, AkitaError>; fn find_by_id<'a, 'b, 'c>(
&self,
conn: ConnMut<'a, 'b, 'c>
) -> Result<Option<Self::Item>, AkitaError>; fn update_by_id<'a, 'b, 'c>(
&self,
conn: ConnMut<'a, 'b, 'c>
) -> Result<bool, AkitaError>; fn delete<'a, 'b, 'c, W: Wrapper>(
&self,
wrapper: &mut W,
conn: ConnMut<'a, 'b, 'c>
) -> Result<bool, AkitaError>; fn delete_by_id<'a, 'b, 'c>(
&self,
conn: ConnMut<'a, 'b, 'c>
) -> Result<bool, AkitaError>; fn get_table_fields(&self) -> Result<String, AkitaError>; fn get_table_idents(&self) -> Result<String, AkitaError>; fn get_update_fields(
&self,
set_sql: Option<String>
) -> Result<String, AkitaError>; fn get_table_name(&self) -> Result<String, AkitaError>;
Associated Types
Required methods
Insert Data.
fn update<'a, 'b, 'c>(
&self,
wrapper: &mut UpdateWrapper,
conn: ConnMut<'a, 'b, 'c>
) -> Result<bool, AkitaError>
fn update<'a, 'b, 'c>(
&self,
wrapper: &mut UpdateWrapper,
conn: ConnMut<'a, 'b, 'c>
) -> Result<bool, AkitaError>
Update Data With Wrapper.
fn list<'a, 'b, 'c, W: Wrapper>(
&self,
wrapper: &mut W,
conn: ConnMut<'a, 'b, 'c>
) -> Result<Vec<Self::Item>, AkitaError> where
Self::Item: Clone,
fn page<'a, 'b, 'c, W: Wrapper>(
&self,
page: usize,
size: usize,
wrapper: &mut W,
conn: ConnMut<'a, 'b, 'c>
) -> Result<IPage<Self::Item>, AkitaError> where
Self::Item: Clone,
Find One With Wrapper.
fn find_by_id<'a, 'b, 'c>(
&self,
conn: ConnMut<'a, 'b, 'c>
) -> Result<Option<Self::Item>, AkitaError>
fn find_by_id<'a, 'b, 'c>(
&self,
conn: ConnMut<'a, 'b, 'c>
) -> Result<Option<Self::Item>, AkitaError>
Find Data With Table’s Ident.
fn update_by_id<'a, 'b, 'c>(
&self,
conn: ConnMut<'a, 'b, 'c>
) -> Result<bool, AkitaError>
fn update_by_id<'a, 'b, 'c>(
&self,
conn: ConnMut<'a, 'b, 'c>
) -> Result<bool, AkitaError>
Update Data With Table’s Ident.
Delete Data With Wrapper.
fn delete_by_id<'a, 'b, 'c>(
&self,
conn: ConnMut<'a, 'b, 'c>
) -> Result<bool, AkitaError>
fn delete_by_id<'a, 'b, 'c>(
&self,
conn: ConnMut<'a, 'b, 'c>
) -> Result<bool, AkitaError>
Delete Data With Table’s Ident.
fn get_table_fields(&self) -> Result<String, AkitaError>
fn get_table_fields(&self) -> Result<String, AkitaError>
Get the Table Fields.
fn get_table_idents(&self) -> Result<String, AkitaError>
fn get_table_idents(&self) -> Result<String, AkitaError>
Get Table Idents.
fn get_update_fields(
&self,
set_sql: Option<String>
) -> Result<String, AkitaError>
fn get_update_fields(
&self,
set_sql: Option<String>
) -> Result<String, AkitaError>
Get Condition Fields.
fn get_table_name(&self) -> Result<String, AkitaError>
fn get_table_name(&self) -> Result<String, AkitaError>
Get Table Name.