[][src]Trait holochain_core_types::eav::storage::EntityAttributeValueStorage

pub trait EntityAttributeValueStorage: Clone + Send + Sync + Debug {
    fn add_eavi(
        &mut self,
        eav: &EntityAttributeValueIndex
    ) -> Result<Option<EntityAttributeValueIndex>, HolochainError>;
fn fetch_eavi(
        &self,
        query: &EaviQuery
    ) -> Result<BTreeSet<EntityAttributeValueIndex>, HolochainError>; }

This provides a simple and flexible interface to define relationships between AddressableContent. It does NOT provide storage for AddressableContent. Use cas::storage::ContentAddressableStorage to store AddressableContent.

Required methods

fn add_eavi(
    &mut self,
    eav: &EntityAttributeValueIndex
) -> Result<Option<EntityAttributeValueIndex>, HolochainError>

Adds the given EntityAttributeValue to the EntityAttributeValueStorage append only storage.

fn fetch_eavi(
    &self,
    query: &EaviQuery
) -> Result<BTreeSet<EntityAttributeValueIndex>, HolochainError>

Fetch the set of EntityAttributeValues that match constraints according to the latest hash version

  • None = no constraint
  • Some(Entity) = requires the given entity (e.g. all a/v pairs for the entity)
  • Some(Attribute) = requires the given attribute (e.g. all links)
  • Some(Value) = requires the given value (e.g. all entities referencing an Address)
Loading content...

Trait Implementations

impl PartialEq<dyn EntityAttributeValueStorage + 'static> for dyn EntityAttributeValueStorage[src]

Implementors

Loading content...