pub struct RootHashMapTable<'a> { /* private fields */ }Implementations§
Source§impl<'a> RootHashMapTable<'a>
impl<'a> RootHashMapTable<'a>
pub fn new(store: &'a HashMapStore) -> Self
Trait Implementations§
Source§impl<'a> RootTable for RootHashMapTable<'a>
impl<'a> RootTable for RootHashMapTable<'a>
fn create(&mut self, entity: &Root) -> Result<Root, RepositoryError>
fn create_multi( &mut self, entities: &[Root], ) -> Result<Vec<Root>, RepositoryError>
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 update(&mut self, entity: &Root) -> Result<Root, RepositoryError>
fn update_multi( &mut self, entities: &[Root], ) -> Result<Vec<Root>, RepositoryError>
fn update_with_relationships( &mut self, entity: &Root, ) -> Result<Root, RepositoryError>
fn update_with_relationships_multi( &mut self, entities: &[Root], ) -> Result<Vec<Root>, RepositoryError>
fn remove(&mut self, id: &EntityId) -> Result<(), RepositoryError>
fn remove_multi(&mut self, ids: &[EntityId]) -> Result<(), 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>
fn set_relationship_multi( &mut self, field: &RootRelationshipField, relationships: Vec<(EntityId, Vec<EntityId>)>, ) -> Result<(), RepositoryError>
fn set_relationship( &mut self, id: &EntityId, field: &RootRelationshipField, right_ids: &[EntityId], ) -> Result<(), RepositoryError>
fn move_relationship_ids( &mut self, id: &EntityId, field: &RootRelationshipField, ids_to_move: &[EntityId], new_index: i32, ) -> Result<Vec<EntityId>, RepositoryError>
Auto Trait Implementations§
impl<'a> Freeze for RootHashMapTable<'a>
impl<'a> RefUnwindSafe for RootHashMapTable<'a>
impl<'a> Send for RootHashMapTable<'a>
impl<'a> Sync for RootHashMapTable<'a>
impl<'a> Unpin for RootHashMapTable<'a>
impl<'a> UnsafeUnpin for RootHashMapTable<'a>
impl<'a> UnwindSafe for RootHashMapTable<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more