Skip to main content

BranchRepository

Trait BranchRepository 

Source
pub trait BranchRepository: Send + Sync {
    // Required methods
    fn get_all<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Branch>, RepositoryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn find_by_id<'life0, 'async_trait>(
        &'life0 self,
        id: i64,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Branch>, RepositoryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn delete_by_id<'life0, 'async_trait>(
        &'life0 self,
        id: i64,
    ) -> Pin<Box<dyn Future<Output = Result<(), RepositoryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn update_last_commit_hash<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: i64,
        hash: &'life1 CommitHash,
    ) -> Pin<Box<dyn Future<Output = Result<(), RepositoryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn update_last_commit_hash_in_tx<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        id: i64,
        hash: &'life1 CommitHash,
        tx: &'life2 mut SqliteConnection,
    ) -> Pin<Box<dyn Future<Output = Result<(), RepositoryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Interface for branches table operations.

Required Methods§

Source

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

Returns all branches.

Source

fn find_by_id<'life0, 'async_trait>( &'life0 self, id: i64, ) -> Pin<Box<dyn Future<Output = Result<Option<Branch>, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the branch with the given id.

Source

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

Deletes the branch with the given id.

Source

fn update_last_commit_hash<'life0, 'life1, 'async_trait>( &'life0 self, id: i64, hash: &'life1 CommitHash, ) -> Pin<Box<dyn Future<Output = Result<(), RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Updates the last commit hash of the branch.

Source

fn update_last_commit_hash_in_tx<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, id: i64, hash: &'life1 CommitHash, tx: &'life2 mut SqliteConnection, ) -> Pin<Box<dyn Future<Output = Result<(), RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Updates the last commit hash of the branch within a transaction.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§