Trait Repository
Source pub trait Repository<T>: Send + Sync{
// Required methods
fn find_by_id<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
context: &'life2 QueryContext,
) -> Pin<Box<dyn Future<Output = Result<Option<T>, DatabaseError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait;
fn find_all<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
options: &'life1 QueryOptions,
context: &'life2 QueryContext,
) -> Pin<Box<dyn Future<Output = Result<Vec<T>, DatabaseError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait;
fn create<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
entity: &'life1 T,
context: &'life2 QueryContext,
) -> Pin<Box<dyn Future<Output = Result<String, DatabaseError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait;
fn update<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
id: &'life1 str,
entity: &'life2 T,
context: &'life3 QueryContext,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait;
fn delete<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
context: &'life2 QueryContext,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait;
fn exists<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
context: &'life2 QueryContext,
) -> Pin<Box<dyn Future<Output = Result<bool, DatabaseError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait;
}