[][src]Struct holochain_persistence_api::eav::query::EaviQuery

pub struct EaviQuery<'a, A: Attribute> {
    pub entity: EavFilter<'a, Entity>,
    pub attribute: EavFilter<'a, A>,
    pub value: EavFilter<'a, Value>,
    pub tombstone: Option<EavFilter<'a, A>>,
    pub index: IndexFilter,
}

Represents a set of filtering operations on the EAVI store.

Fields

entity: EavFilter<'a, Entity>

represents a filter for the Entity

attribute: EavFilter<'a, A>

represents a filter for the Attribute

value: EavFilter<'a, Value>

represents a filter for the Value

tombstone: Option<EavFilter<'a, A>>

For this query system we are able to provide a tombstone set on the query level which allows us to specify which Attribute match should take precedent over the others. This is useful for some of the Link CRDT operations we are doing. Note that if no tombstone is found, the latest entry is returned from the subset that is obtained. The tombstone is optional so if it is not supplied, no tombstone check will be done. Currently the Tombstone does not work on an IndexByRange IndexFilter and will operate as if the tombstone was not set

index: IndexFilter

represents a filter for the Index

Methods

impl<'a, A: Attribute> EaviQuery<'a, A>[src]

Creates a query for the EAVI system

pub fn new(
    entity: EavFilter<'a, Entity>,
    attribute: EavFilter<'a, A>,
    value: EavFilter<'a, Value>,
    index: IndexFilter,
    tombstone: Option<EavFilter<'a, A>>
) -> Self
[src]

pub fn run<I>(&self, iter: I) -> BTreeSet<EntityAttributeValueIndex<A>> where
    I: Clone + Iterator<Item = EntityAttributeValueIndex<A>> + 'a, 
[src]

This runs the query based the query configuration we have given.

pub fn entity(&self) -> &EavFilter<'a, Entity>[src]

pub fn attribute(&self) -> &EavFilter<'a, A>[src]

pub fn value(&self) -> &EavFilter<'a, Value>[src]

pub fn index(&self) -> &IndexFilter[src]

pub fn tombstone(&self) -> &Option<EavFilter<'a, A>>[src]

Trait Implementations

impl<'a, A: Attribute> Default for EaviQuery<'a, A>[src]

Auto Trait Implementations

impl<'a, A> !Send for EaviQuery<'a, A>

impl<'a, A> !Sync for EaviQuery<'a, A>

impl<'a, A> Unpin for EaviQuery<'a, A> where
    A: Unpin

impl<'a, A> !UnwindSafe for EaviQuery<'a, A>

impl<'a, A> !RefUnwindSafe for EaviQuery<'a, A>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self