Struct mentat_db::cache::AttributeCaches
[−]
[src]
pub struct AttributeCaches { /* fields omitted */ }
Methods
impl AttributeCaches
[src]
impl AttributeCaches
pub fn unregister_attribute<U>(&mut self, attribute: U) where
U: Into<Entid>,
[src]
pub fn unregister_attribute<U>(&mut self, attribute: U) where
U: Into<Entid>,
impl AttributeCaches
[src]
impl AttributeCaches
pub fn forward_attribute_cache_for_attribute<'a, 's>(
&'a self,
schema: &'s Schema,
a: Entid
) -> Option<&'a AttributeCache>
[src]
pub fn forward_attribute_cache_for_attribute<'a, 's>(
&'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]
pub fn extend_cache_for_entities_and_attributes<'s, 'c>(
&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]
pub fn make_cache_for_entities_and_attributes<'s, 'c>(
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]
impl Clone for AttributeCaches
fn clone(&self) -> AttributeCaches
[src]
fn clone(&self) -> AttributeCaches
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for AttributeCaches
[src]
impl Debug for AttributeCaches
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Default for AttributeCaches
[src]
impl Default for AttributeCaches
fn default() -> AttributeCaches
[src]
fn default() -> AttributeCaches
Returns the "default value" for a type. Read more
impl CachedAttributes for AttributeCaches
[src]
impl CachedAttributes for AttributeCaches
fn get_values_for_entid(
&self,
schema: &Schema,
attribute: Entid,
entid: Entid
) -> Option<&Vec<TypedValue>>
[src]
fn get_values_for_entid(
&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]
fn get_value_for_entid(
&self,
schema: &Schema,
attribute: Entid,
entid: Entid
) -> Option<&TypedValue>
fn has_cached_attributes(&self) -> bool
[src]
fn has_cached_attributes(&self) -> bool
fn is_attribute_cached_reverse(&self, attribute: Entid) -> bool
[src]
fn is_attribute_cached_reverse(&self, attribute: Entid) -> bool
fn is_attribute_cached_forward(&self, attribute: Entid) -> bool
[src]
fn is_attribute_cached_forward(&self, attribute: Entid) -> bool
fn get_entid_for_value(
&self,
attribute: Entid,
value: &TypedValue
) -> Option<Entid>
[src]
fn get_entid_for_value(
&self,
attribute: Entid,
value: &TypedValue
) -> Option<Entid>
Reverse lookup.
fn get_entids_for_value(
&self,
attribute: Entid,
value: &TypedValue
) -> Option<&BTreeSet<Entid>>
[src]
fn get_entids_for_value(
&self,
attribute: Entid,
value: &TypedValue
) -> Option<&BTreeSet<Entid>>
impl UpdateableCache for AttributeCaches
[src]
impl UpdateableCache for AttributeCaches
Auto Trait Implementations
impl Send for AttributeCaches
impl Send for AttributeCaches
impl Sync for AttributeCaches
impl Sync for AttributeCaches