Skip to main content

RootTableRO

Trait RootTableRO 

Source
pub trait RootTableRO {
    // Required methods
    fn get(&self, id: &EntityId) -> Result<Option<Root>, RepositoryError>;
    fn get_multi(
        &self,
        ids: &[EntityId],
    ) -> Result<Vec<Option<Root>>, RepositoryError>;
    fn get_all(&self) -> Result<Vec<Root>, RepositoryError>;
    fn get_relationship(
        &self,
        id: &EntityId,
        field: &RootRelationshipField,
    ) -> Result<Vec<EntityId>, RepositoryError>;
    fn get_relationship_many(
        &self,
        ids: &[EntityId],
        field: &RootRelationshipField,
    ) -> Result<HashMap<EntityId, Vec<EntityId>>, RepositoryError>;
    fn get_relationship_count(
        &self,
        id: &EntityId,
        field: &RootRelationshipField,
    ) -> Result<usize, RepositoryError>;
    fn get_relationship_in_range(
        &self,
        id: &EntityId,
        field: &RootRelationshipField,
        offset: usize,
        limit: usize,
    ) -> Result<Vec<EntityId>, RepositoryError>;
    fn get_relationships_from_right_ids(
        &self,
        field: &RootRelationshipField,
        right_ids: &[EntityId],
    ) -> Result<Vec<(EntityId, Vec<EntityId>)>, RepositoryError>;
}

Required Methods§

Implementors§