Trait DMSCORMRepository
Source pub trait DMSCORMRepository<E: for<'de> Deserialize<'de> + Serialize + Clone + Send + Sync>: Send + Sync {
Show 17 methods
// Required methods
fn table_name(&self) -> &'static str;
fn find_all<'life0, 'life1, 'async_trait>(
&'life0 self,
db: &'life1 dyn DMSCDatabase,
) -> Pin<Box<dyn Future<Output = DMSCResult<Vec<E>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn find_by_id<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
db: &'life1 dyn DMSCDatabase,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = DMSCResult<Option<E>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn find_one<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
db: &'life1 dyn DMSCDatabase,
criteria: &'life2 Criteria,
) -> Pin<Box<dyn Future<Output = DMSCResult<Option<E>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn find_many<'life0, 'life1, 'async_trait>(
&'life0 self,
db: &'life1 dyn DMSCDatabase,
criteria: Vec<Criteria>,
) -> Pin<Box<dyn Future<Output = DMSCResult<Vec<E>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn find_paginated<'life0, 'life1, 'async_trait>(
&'life0 self,
db: &'life1 dyn DMSCDatabase,
pagination: Pagination,
criteria: Vec<Criteria>,
) -> Pin<Box<dyn Future<Output = DMSCResult<(Vec<E>, u64)>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn count<'life0, 'life1, 'async_trait>(
&'life0 self,
db: &'life1 dyn DMSCDatabase,
criteria: Vec<Criteria>,
) -> Pin<Box<dyn Future<Output = DMSCResult<u64>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn save<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
db: &'life1 dyn DMSCDatabase,
entity: &'life2 E,
) -> Pin<Box<dyn Future<Output = DMSCResult<E>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn save_many<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
db: &'life1 dyn DMSCDatabase,
entities: &'life2 [E],
) -> Pin<Box<dyn Future<Output = DMSCResult<Vec<E>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn update<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
db: &'life1 dyn DMSCDatabase,
entity: &'life2 E,
) -> Pin<Box<dyn Future<Output = DMSCResult<E>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn delete<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
db: &'life1 dyn DMSCDatabase,
entity: &'life2 E,
) -> Pin<Box<dyn Future<Output = DMSCResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn delete_by_id<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
db: &'life1 dyn DMSCDatabase,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = DMSCResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn delete_many<'life0, 'life1, 'async_trait>(
&'life0 self,
db: &'life1 dyn DMSCDatabase,
criteria: Vec<Criteria>,
) -> Pin<Box<dyn Future<Output = DMSCResult<u64>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn exists<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
db: &'life1 dyn DMSCDatabase,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = DMSCResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn exists_by<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
db: &'life1 dyn DMSCDatabase,
criteria: &'life2 Criteria,
) -> Pin<Box<dyn Future<Output = DMSCResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn batch_insert<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
db: &'life1 dyn DMSCDatabase,
entities: &'life2 [E],
batch_size: usize,
) -> Pin<Box<dyn Future<Output = DMSCResult<Vec<E>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn upsert<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
db: &'life1 dyn DMSCDatabase,
entity: &'life2 E,
conflict_columns: &'life3 [&'life4 str],
) -> Pin<Box<dyn Future<Output = DMSCResult<E>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait;
}