RepositoryManagementRepository

Trait RepositoryManagementRepository 

Source
pub trait RepositoryManagementRepository<DB: Database>: DatabaseRepository<DB> {
    // Required methods
    fn get_all_repositories<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<ModelRepository>, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_repository_by_id<'life0, 'async_trait>(
        &'life0 self,
        id: Uuid,
    ) -> Pin<Box<dyn Future<Output = Result<Option<ModelRepository>, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn create_repository<'life0, 'life1, 'async_trait>(
        &'life0 self,
        repository: &'life1 ModelRepository,
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn update_repository<'life0, 'life1, 'async_trait>(
        &'life0 self,
        repository: &'life1 ModelRepository,
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn delete_repository<'life0, 'async_trait>(
        &'life0 self,
        id: Uuid,
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn record_sync_result<'life0, 'life1, 'async_trait>(
        &'life0 self,
        sync_result: &'life1 SyncResult,
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_sync_history<'life0, 'async_trait>(
        &'life0 self,
        repository_id: Uuid,
        limit: Option<i64>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<SyncResult>, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

仓库管理数据库仓库

Required Methods§

Source

fn get_all_repositories<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<ModelRepository>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

获取所有模型仓库

Source

fn get_repository_by_id<'life0, 'async_trait>( &'life0 self, id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Option<ModelRepository>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

根据ID获取仓库

Source

fn create_repository<'life0, 'life1, 'async_trait>( &'life0 self, repository: &'life1 ModelRepository, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

创建仓库

Source

fn update_repository<'life0, 'life1, 'async_trait>( &'life0 self, repository: &'life1 ModelRepository, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

更新仓库

Source

fn delete_repository<'life0, 'async_trait>( &'life0 self, id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

删除仓库

Source

fn record_sync_result<'life0, 'life1, 'async_trait>( &'life0 self, sync_result: &'life1 SyncResult, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

记录同步结果

Source

fn get_sync_history<'life0, 'async_trait>( &'life0 self, repository_id: Uuid, limit: Option<i64>, ) -> Pin<Box<dyn Future<Output = Result<Vec<SyncResult>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

获取同步历史

Implementors§