Struct akita::AkitaEntityManager [−][src]
pub struct AkitaEntityManager(pub DatabasePlatform);
Tuple Fields
0: DatabasePlatform
Implementations
get the table from database based on this column name
pub fn set_autoincrement_value(
&mut self,
table_name: &TableName,
sequence_value: i64
) -> Result<Option<i64>, AkitaError>
pub fn set_autoincrement_value(
&mut self,
table_name: &TableName,
sequence_value: i64
) -> Result<Option<i64>, AkitaError>
set the autoincrement value of the primary column(if present) of this table. If the primary column of this table is not an autoincrement, returns Ok(None).
pub fn get_autoincrement_last_value(
&mut self,
table_name: &TableName
) -> Result<Option<i64>, AkitaError>
Trait Implementations
fn list<T, W>(&mut self, wrapper: &mut W) -> Result<Vec<T>, AkitaError> where
T: GetTableName + GetFields + FromAkita,
W: Wrapper,
fn list<T, W>(&mut self, wrapper: &mut W) -> Result<Vec<T>, AkitaError> where
T: GetTableName + GetFields + FromAkita,
W: Wrapper,
Get all the table of records
fn select_one<T, W>(&mut self, wrapper: &mut W) -> Result<Option<T>, AkitaError> where
T: GetTableName + GetFields + FromAkita,
W: Wrapper,
fn select_one<T, W>(&mut self, wrapper: &mut W) -> Result<Option<T>, AkitaError> where
T: GetTableName + GetFields + FromAkita,
W: Wrapper,
Get one the table of records
fn select_by_id<T, I>(&mut self, id: I) -> Result<Option<T>, AkitaError> where
T: GetTableName + GetFields + FromAkita,
I: ToValue,
fn select_by_id<T, I>(&mut self, id: I) -> Result<Option<T>, AkitaError> where
T: GetTableName + GetFields + FromAkita,
I: ToValue,
Get one the table of records by id
Get table of records with page
fn count<T, W>(&mut self, wrapper: &mut W) -> Result<usize, AkitaError> where
T: GetTableName + GetFields,
W: Wrapper,
fn count<T, W>(&mut self, wrapper: &mut W) -> Result<usize, AkitaError> where
T: GetTableName + GetFields,
W: Wrapper,
Get the total count of records
fn remove<T, W>(&mut self, wrapper: &mut W) -> Result<(), AkitaError> where
T: GetTableName + GetFields,
W: Wrapper,
fn remove<T, W>(&mut self, wrapper: &mut W) -> Result<(), AkitaError> where
T: GetTableName + GetFields,
W: Wrapper,
Remove the records by wrapper.
fn remove_by_id<T, I>(&mut self, id: I) -> Result<(), AkitaError> where
I: ToValue,
T: GetTableName + GetFields,
fn remove_by_id<T, I>(&mut self, id: I) -> Result<(), AkitaError> where
I: ToValue,
T: GetTableName + GetFields,
Remove the records by id.
fn update<T>(
&mut self,
entity: &T,
wrapper: &mut UpdateWrapper
) -> Result<(), AkitaError> where
T: GetTableName + GetFields + ToAkita,
fn update<T>(
&mut self,
entity: &T,
wrapper: &mut UpdateWrapper
) -> Result<(), AkitaError> where
T: GetTableName + GetFields + ToAkita,
Update the records by wrapper.
fn update_by_id<T>(&mut self, entity: &T) -> Result<(), AkitaError> where
T: GetTableName + GetFields + ToAkita,
fn update_by_id<T>(&mut self, entity: &T) -> Result<(), AkitaError> where
T: GetTableName + GetFields + ToAkita,
Update the records by id.
fn save<T>(&mut self, entity: &T) -> Result<usize, AkitaError> where
T: GetTableName + GetFields + ToAkita,
fn save<T>(&mut self, entity: &T) -> Result<usize, AkitaError> where
T: GetTableName + GetFields + ToAkita,
called multiple times when using database platform that doesn;t support multiple value