Struct mentat_db::cache::AttributeCaches
[−]
[src]
pub struct AttributeCaches { /* fields omitted */ }
Methods
impl AttributeCaches
[src]
pub fn unregister_attribute<U>(&mut self, attribute: U) where
U: Into<Entid>,
[src]
U: Into<Entid>,
impl AttributeCaches
[src]
pub fn forward_attribute_cache_for_attribute<'a, 's>(
&'a self,
schema: &'s Schema,
a: Entid
) -> Option<&'a AttributeCache>
[src]
&'a self,
schema: &'s Schema,
a: Entid
) -> Option<&'a AttributeCache>
Return a reference to the cache for the provided a
, if a
names an attribute that is
cached in the forward direction. If a
doesn't name an attribute, or it's not cached at
all, or it's only cached in reverse (v
to e
, not e
to v
), None
is returned.
pub fn extend_cache_for_entities_and_attributes<'s, 'c>(
&mut self,
schema: &'s Schema,
sqlite: &'c Connection,
attrs: AttributeSpec,
entities: &Vec<Entid>
) -> Result<()>
[src]
&mut self,
schema: &'s Schema,
sqlite: &'c Connection,
attrs: AttributeSpec,
entities: &Vec<Entid>
) -> Result<()>
Fetch the requested entities and attributes from the store and put them in the cache.
The caller is responsible for ensuring that entities
is unique.
Attributes for which every entity is already cached will not be processed again.
pub fn make_cache_for_entities_and_attributes<'s, 'c>(
schema: &'s Schema,
sqlite: &'c Connection,
attrs: AttributeSpec,
entities: &Vec<Entid>
) -> Result<AttributeCaches>
[src]
schema: &'s Schema,
sqlite: &'c Connection,
attrs: AttributeSpec,
entities: &Vec<Entid>
) -> Result<AttributeCaches>
Fetch the requested entities and attributes and put them in a new cache.
The caller is responsible for ensuring that entities
is unique.
Trait Implementations
impl Clone for AttributeCaches
[src]
fn clone(&self) -> AttributeCaches
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for AttributeCaches
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Default for AttributeCaches
[src]
fn default() -> AttributeCaches
[src]
Returns the "default value" for a type. Read more
impl CachedAttributes for AttributeCaches
[src]
fn get_values_for_entid(
&self,
schema: &Schema,
attribute: Entid,
entid: Entid
) -> Option<&Vec<TypedValue>>
[src]
&self,
schema: &Schema,
attribute: Entid,
entid: Entid
) -> Option<&Vec<TypedValue>>
fn get_value_for_entid(
&self,
schema: &Schema,
attribute: Entid,
entid: Entid
) -> Option<&TypedValue>
[src]
&self,
schema: &Schema,
attribute: Entid,
entid: Entid
) -> Option<&TypedValue>
fn has_cached_attributes(&self) -> bool
[src]
fn is_attribute_cached_reverse(&self, attribute: Entid) -> bool
[src]
fn is_attribute_cached_forward(&self, attribute: Entid) -> bool
[src]
fn get_entid_for_value(
&self,
attribute: Entid,
value: &TypedValue
) -> Option<Entid>
[src]
&self,
attribute: Entid,
value: &TypedValue
) -> Option<Entid>
Reverse lookup.
fn get_entids_for_value(
&self,
attribute: Entid,
value: &TypedValue
) -> Option<&BTreeSet<Entid>>
[src]
&self,
attribute: Entid,
value: &TypedValue
) -> Option<&BTreeSet<Entid>>