pub struct FrameRepository<'a> { /* private fields */ }Implementations§
Source§impl<'a> FrameRepository<'a>
impl<'a> FrameRepository<'a>
pub fn new( redb_table: Box<dyn FrameTable + 'a>, transaction: &'a Transaction, ) -> Self
pub fn create_orphan( &mut self, event_buffer: &mut EventBuffer, entity: &Frame, ) -> Result<Frame, RepositoryError>
pub fn create_orphan_multi( &mut self, event_buffer: &mut EventBuffer, entities: &[Frame], ) -> Result<Vec<Frame>, RepositoryError>
pub fn create( &mut self, event_buffer: &mut EventBuffer, entity: &Frame, owner_id: EntityId, index: i32, ) -> Result<Frame, RepositoryError>
pub fn create_multi( &mut self, event_buffer: &mut EventBuffer, entities: &[Frame], owner_id: EntityId, index: i32, ) -> Result<Vec<Frame>, RepositoryError>
pub fn get(&self, id: &EntityId) -> Result<Option<Frame>, RepositoryError>
pub fn get_multi( &self, ids: &[EntityId], ) -> Result<Vec<Option<Frame>>, RepositoryError>
pub fn get_all(&self) -> Result<Vec<Frame>, RepositoryError>
pub fn update( &mut self, event_buffer: &mut EventBuffer, entity: &Frame, ) -> Result<Frame, RepositoryError>
pub fn update_multi( &mut self, event_buffer: &mut EventBuffer, entities: &[Frame], ) -> Result<Vec<Frame>, RepositoryError>
pub fn update_with_relationships( &mut self, event_buffer: &mut EventBuffer, entity: &Frame, ) -> Result<Frame, RepositoryError>
pub fn update_with_relationships_multi( &mut self, event_buffer: &mut EventBuffer, entities: &[Frame], ) -> Result<Vec<Frame>, RepositoryError>
pub fn remove( &mut self, event_buffer: &mut EventBuffer, id: &EntityId, ) -> Result<(), RepositoryError>
pub fn remove_multi( &mut self, event_buffer: &mut EventBuffer, ids: &[EntityId], ) -> Result<(), RepositoryError>
pub fn get_relationship( &self, id: &EntityId, field: &FrameRelationshipField, ) -> Result<Vec<EntityId>, RepositoryError>
pub fn get_relationship_many( &self, ids: &[EntityId], field: &FrameRelationshipField, ) -> Result<HashMap<EntityId, Vec<EntityId>>, RepositoryError>
pub fn get_relationship_count( &self, id: &EntityId, field: &FrameRelationshipField, ) -> Result<usize, RepositoryError>
pub fn get_relationship_in_range( &self, id: &EntityId, field: &FrameRelationshipField, offset: usize, limit: usize, ) -> Result<Vec<EntityId>, RepositoryError>
pub fn get_relationships_from_right_ids( &self, field: &FrameRelationshipField, right_ids: &[EntityId], ) -> Result<Vec<(EntityId, Vec<EntityId>)>, RepositoryError>
pub fn set_relationship_multi( &mut self, event_buffer: &mut EventBuffer, field: &FrameRelationshipField, relationships: Vec<(EntityId, Vec<EntityId>)>, ) -> Result<(), RepositoryError>
pub fn set_relationship( &mut self, event_buffer: &mut EventBuffer, id: &EntityId, field: &FrameRelationshipField, right_ids: &[EntityId], ) -> Result<(), RepositoryError>
pub fn move_relationship_ids( &mut self, event_buffer: &mut EventBuffer, id: &EntityId, field: &FrameRelationshipField, ids_to_move: &[EntityId], new_index: i32, ) -> Result<Vec<EntityId>, RepositoryError>
pub fn get_relationships_from_owner( &self, owner_id: &EntityId, ) -> Result<Vec<EntityId>, RepositoryError>
pub fn set_relationships_in_owner( &mut self, event_buffer: &mut EventBuffer, owner_id: &EntityId, ids: &[EntityId], ) -> Result<(), RepositoryError>
pub fn snapshot( &self, ids: &[EntityId], ) -> Result<EntityTreeSnapshot, RepositoryError>
pub fn restore( &mut self, event_buffer: &mut EventBuffer, snap: &EntityTreeSnapshot, ) -> Result<(), RepositoryError>
Auto Trait Implementations§
impl<'a> Freeze for FrameRepository<'a>
impl<'a> !RefUnwindSafe for FrameRepository<'a>
impl<'a> !Send for FrameRepository<'a>
impl<'a> !Sync for FrameRepository<'a>
impl<'a> Unpin for FrameRepository<'a>
impl<'a> UnsafeUnpin for FrameRepository<'a>
impl<'a> !UnwindSafe for FrameRepository<'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