Struct mentat_transaction::query::Known
[−]
[src]
pub struct Known<'s, 'c> { pub schema: &'s Schema, pub cache: Option<&'c (CachedAttributes + 'c)>, }
A convenience wrapper around things known in memory: the schema and caches. We use a trait object here to avoid making dozens of functions generic over the type of the cache. If performance becomes a concern, we should hard-code specific kinds of cache right here, and/or eliminate the Option.
Fields
schema: &'s Schema
cache: Option<&'c (CachedAttributes + 'c)>
Methods
impl<'s, 'c> Known<'s, 'c>
[src]
pub fn for_schema(s: &'s Schema) -> Known<'s, 'static>
[src]
pub fn new(
s: &'s Schema,
c: Option<&'c (CachedAttributes + 'c)>
) -> Known<'s, 'c>
[src]
s: &'s Schema,
c: Option<&'c (CachedAttributes + 'c)>
) -> Known<'s, 'c>
impl<'s, 'c> Known<'s, 'c>
[src]
This is CachedAttributes
, but with handy generic parameters.
Why not make the trait generic? Because then we can't use it as a trait object in Known
.
pub fn is_attribute_cached_reverse<U>(&self, entid: U) -> bool where
U: Into<i64>,
[src]
U: Into<i64>,
pub fn is_attribute_cached_forward<U>(&self, entid: U) -> bool where
U: Into<i64>,
[src]
U: Into<i64>,
pub fn get_values_for_entid<U, V>(
&self,
schema: &Schema,
attribute: U,
entid: V
) -> Option<&Vec<TypedValue>> where
U: Into<i64>,
V: Into<i64>,
[src]
&self,
schema: &Schema,
attribute: U,
entid: V
) -> Option<&Vec<TypedValue>> where
U: Into<i64>,
V: Into<i64>,
pub fn get_value_for_entid<U, V>(
&self,
schema: &Schema,
attribute: U,
entid: V
) -> Option<&TypedValue> where
U: Into<i64>,
V: Into<i64>,
[src]
&self,
schema: &Schema,
attribute: U,
entid: V
) -> Option<&TypedValue> where
U: Into<i64>,
V: Into<i64>,
pub fn get_entid_for_value<U>(
&self,
attribute: U,
value: &TypedValue
) -> Option<i64> where
U: Into<i64>,
[src]
&self,
attribute: U,
value: &TypedValue
) -> Option<i64> where
U: Into<i64>,
pub fn get_entids_for_value<U>(
&self,
attribute: U,
value: &TypedValue
) -> Option<&BTreeSet<i64>> where
U: Into<i64>,
[src]
&self,
attribute: U,
value: &TypedValue
) -> Option<&BTreeSet<i64>> where
U: Into<i64>,