Struct mentat_db::cache::InProgressSQLiteAttributeCache
[−]
[src]
pub struct InProgressSQLiteAttributeCache { pub overlay: AttributeCaches, // some fields omitted }
We maintain a diff on top of the inner
-- existing -- cache.
That involves tracking unregisterings and registerings.
Fields
overlay: AttributeCaches
Methods
impl InProgressSQLiteAttributeCache
[src]
pub fn from_cache(inner: SQLiteAttributeCache) -> InProgressSQLiteAttributeCache
[src]
pub fn register_forward<U>(
&mut self,
schema: &Schema,
sqlite: &Connection,
attribute: U
) -> Result<()> where
U: Into<Entid>,
[src]
&mut self,
schema: &Schema,
sqlite: &Connection,
attribute: U
) -> Result<()> where
U: Into<Entid>,
pub fn register_reverse<U>(
&mut self,
schema: &Schema,
sqlite: &Connection,
attribute: U
) -> Result<()> where
U: Into<Entid>,
[src]
&mut self,
schema: &Schema,
sqlite: &Connection,
attribute: U
) -> Result<()> where
U: Into<Entid>,
pub fn register<U>(
&mut self,
schema: &Schema,
sqlite: &Connection,
attribute: U
) -> Result<()> where
U: Into<Entid>,
[src]
&mut self,
schema: &Schema,
sqlite: &Connection,
attribute: U
) -> Result<()> where
U: Into<Entid>,
pub fn unregister<U>(&mut self, attribute: U) where
U: Into<Entid>,
[src]
U: Into<Entid>,
pub fn unregister_all(&mut self)
[src]
impl InProgressSQLiteAttributeCache
[src]
pub fn values_pairs<U>(
&self,
schema: &Schema,
attribute: U
) -> Option<&BTreeMap<Entid, Vec<TypedValue>>> where
U: Into<Entid>,
[src]
&self,
schema: &Schema,
attribute: U
) -> Option<&BTreeMap<Entid, Vec<TypedValue>>> where
U: Into<Entid>,
Intended for use from tests.
pub fn value_pairs<U>(
&self,
schema: &Schema,
attribute: U
) -> Option<&BTreeMap<Entid, Option<TypedValue>>> where
U: Into<Entid>,
[src]
&self,
schema: &Schema,
attribute: U
) -> Option<&BTreeMap<Entid, Option<TypedValue>>> where
U: Into<Entid>,
Intended for use from tests.
pub fn commit_to(self, destination: &mut SQLiteAttributeCache)
[src]
impl InProgressSQLiteAttributeCache
[src]
pub fn transact_watcher<'a>(&'a mut self) -> InProgressCacheTransactWatcher<'a>
[src]
Trait Implementations
impl Debug for InProgressSQLiteAttributeCache
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Default for InProgressSQLiteAttributeCache
[src]
fn default() -> InProgressSQLiteAttributeCache
[src]
Returns the "default value" for a type. Read more
impl UpdateableCache<DbError> for InProgressSQLiteAttributeCache
[src]
fn update<I>(
&mut self,
schema: &Schema,
retractions: I,
assertions: I
) -> Result<()> where
I: Iterator<Item = (Entid, Entid, TypedValue)>,
[src]
&mut self,
schema: &Schema,
retractions: I,
assertions: I
) -> Result<()> where
I: Iterator<Item = (Entid, Entid, TypedValue)>,
impl CachedAttributes for InProgressSQLiteAttributeCache
[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 is_attribute_cached_reverse(&self, attribute: Entid) -> bool
[src]
fn is_attribute_cached_forward(&self, attribute: Entid) -> bool
[src]
fn has_cached_attributes(&self) -> bool
[src]
fn get_entids_for_value(
&self,
attribute: Entid,
value: &TypedValue
) -> Option<&BTreeSet<Entid>>
[src]
&self,
attribute: Entid,
value: &TypedValue
) -> Option<&BTreeSet<Entid>>
fn get_entid_for_value(
&self,
attribute: Entid,
value: &TypedValue
) -> Option<Entid>
[src]
&self,
attribute: Entid,
value: &TypedValue
) -> Option<Entid>
Reverse lookup.