[−][src]Struct holochain_persistence_api::eav::query::EaviQuery
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]
entity: EavFilter<'a, Entity>,
attribute: EavFilter<'a, A>,
value: EavFilter<'a, Value>,
index: IndexFilter,
tombstone: Option<EavFilter<'a, A>>
) -> Self
pub fn run<I>(&self, iter: I) -> BTreeSet<EntityAttributeValueIndex<A>> where
I: Clone + Iterator<Item = EntityAttributeValueIndex<A>> + 'a,
[src]
I: Clone + Iterator<Item = EntityAttributeValueIndex<A>> + 'a,
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
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,
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]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self