Skip to main content

DocumentHashMapTable

Struct DocumentHashMapTable 

Source
pub struct DocumentHashMapTable<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> DocumentHashMapTable<'a>

Source

pub fn new(store: &'a HashMapStore) -> Self

Trait Implementations§

Source§

impl<'a> DocumentTable for DocumentHashMapTable<'a>

Source§

fn create(&mut self, entity: &Document) -> Result<Document, RepositoryError>

Source§

fn create_multi( &mut self, entities: &[Document], ) -> Result<Vec<Document>, RepositoryError>

Source§

fn get(&self, id: &EntityId) -> Result<Option<Document>, RepositoryError>

Source§

fn get_multi( &self, ids: &[EntityId], ) -> Result<Vec<Option<Document>>, RepositoryError>

Source§

fn get_all(&self) -> Result<Vec<Document>, RepositoryError>

Source§

fn update(&mut self, entity: &Document) -> Result<Document, RepositoryError>

Source§

fn update_multi( &mut self, entities: &[Document], ) -> Result<Vec<Document>, RepositoryError>

Source§

fn update_with_relationships( &mut self, entity: &Document, ) -> Result<Document, RepositoryError>

Source§

fn update_with_relationships_multi( &mut self, entities: &[Document], ) -> Result<Vec<Document>, RepositoryError>

Source§

fn remove(&mut self, id: &EntityId) -> Result<(), RepositoryError>

Source§

fn remove_multi(&mut self, ids: &[EntityId]) -> Result<(), RepositoryError>

Source§

fn get_relationship( &self, id: &EntityId, field: &DocumentRelationshipField, ) -> Result<Vec<EntityId>, RepositoryError>

Source§

fn get_relationship_many( &self, ids: &[EntityId], field: &DocumentRelationshipField, ) -> Result<HashMap<EntityId, Vec<EntityId>>, RepositoryError>

Source§

fn get_relationship_count( &self, id: &EntityId, field: &DocumentRelationshipField, ) -> Result<usize, RepositoryError>

Source§

fn get_relationship_in_range( &self, id: &EntityId, field: &DocumentRelationshipField, offset: usize, limit: usize, ) -> Result<Vec<EntityId>, RepositoryError>

Source§

fn get_relationships_from_right_ids( &self, field: &DocumentRelationshipField, right_ids: &[EntityId], ) -> Result<Vec<(EntityId, Vec<EntityId>)>, RepositoryError>

Source§

fn set_relationship_multi( &mut self, field: &DocumentRelationshipField, relationships: Vec<(EntityId, Vec<EntityId>)>, ) -> Result<(), RepositoryError>

Source§

fn set_relationship( &mut self, id: &EntityId, field: &DocumentRelationshipField, right_ids: &[EntityId], ) -> Result<(), RepositoryError>

Source§

fn move_relationship_ids( &mut self, id: &EntityId, field: &DocumentRelationshipField, ids_to_move: &[EntityId], new_index: i32, ) -> Result<Vec<EntityId>, RepositoryError>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.