Struct akita::AkitaEntityManager [−][src]
pub struct AkitaEntityManager(_);
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>(&mut self, wrapper: Wrapper) -> Result<Vec<T>, AkitaError> where
T: GetTableName + GetFields + FromValue,
fn list<T>(&mut self, wrapper: Wrapper) -> Result<Vec<T>, AkitaError> where
T: GetTableName + GetFields + FromValue,
Get all the table of records
fn select_one<T>(&mut self, wrapper: Wrapper) -> Result<Option<T>, AkitaError> where
T: GetTableName + GetFields + FromValue,
fn select_one<T>(&mut self, wrapper: Wrapper) -> Result<Option<T>, AkitaError> where
T: GetTableName + GetFields + FromValue,
Get one the table of records
fn select_by_id<T, I>(&mut self, id: I) -> Result<Option<T>, AkitaError> where
T: GetTableName + GetFields + FromValue,
I: ToValue,
fn select_by_id<T, I>(&mut self, id: I) -> Result<Option<T>, AkitaError> where
T: GetTableName + GetFields + FromValue,
I: ToValue,
Get one the table of records by id
Get table of records with page
fn count<T>(&mut self, wrapper: Wrapper) -> Result<usize, AkitaError> where
T: GetTableName + GetFields,
fn count<T>(&mut self, wrapper: Wrapper) -> Result<usize, AkitaError> where
T: GetTableName + GetFields,
Get the total count of records
fn remove<T>(&mut self, wrapper: Wrapper) -> Result<(), AkitaError> where
T: GetTableName + GetFields,
fn remove<T>(&mut self, wrapper: Wrapper) -> Result<(), AkitaError> where
T: GetTableName + GetFields,
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 remove_by_ids<T, I>(&mut self, ids: Vec<I>) -> Result<(), AkitaError> where
I: ToValue,
T: GetTableName + GetFields,
fn remove_by_ids<T, I>(&mut self, ids: Vec<I>) -> Result<(), AkitaError> where
I: ToValue,
T: GetTableName + GetFields,
Remove the records by wrapper.
fn update<T>(&mut self, entity: &T, wrapper: Wrapper) -> Result<(), AkitaError> where
T: GetTableName + GetFields + ToValue,
fn update<T>(&mut self, entity: &T, wrapper: Wrapper) -> Result<(), AkitaError> where
T: GetTableName + GetFields + ToValue,
Update the records by wrapper.
fn update_by_id<T>(&mut self, entity: &T) -> Result<(), AkitaError> where
T: GetTableName + GetFields + ToValue,
fn update_by_id<T>(&mut self, entity: &T) -> Result<(), AkitaError> where
T: GetTableName + GetFields + ToValue,
Update the records by id.
fn save<T, I>(&mut self, entity: &T) -> Result<Option<I>, AkitaError> where
T: GetTableName + GetFields + ToValue,
I: FromValue,
fn save<T, I>(&mut self, entity: &T) -> Result<Option<I>, AkitaError> where
T: GetTableName + GetFields + ToValue,
I: FromValue,
called multiple times when using database platform that doesn;t support multiple value
fn save_or_update<T, I>(&mut self, entity: &T) -> Result<Option<I>, AkitaError> where
T: GetTableName + GetFields + ToValue,
I: FromValue,
fn save_or_update<T, I>(&mut self, entity: &T) -> Result<Option<I>, AkitaError> where
T: GetTableName + GetFields + ToValue,
I: FromValue,
save or update