Struct mentat_ffi::InProgress
[−]
[src]
pub struct InProgress<'a, 'c> { /* fields omitted */ }
Represents an in-progress, not yet committed, set of changes to the store.
Call commit
to commit your changes, or rollback
to discard them.
A transaction is held open until you do so.
Your changes will be implicitly dropped along with this struct.
Methods
impl<'a, 'c> InProgress<'a, 'c>
[src]
impl<'a, 'c> InProgress<'a, 'c>
pub fn builder(self) -> InProgressBuilder<'a, 'c>
[src]
pub fn builder(self) -> InProgressBuilder<'a, 'c>
pub fn use_caching(&mut self, yesno: bool)
[src]
pub fn use_caching(&mut self, yesno: bool)
Choose whether to use in-memory caches for running queries.
pub fn transact_builder(
&mut self,
builder: TermBuilder
) -> Result<TxReport, Error>
[src]
pub fn transact_builder(
&mut self,
builder: TermBuilder
) -> Result<TxReport, Error>
If you only have a reference to an InProgress
, you can't use the easy builder.
This exists so you can make your own.
pub fn transact_terms<I>(
&mut self,
terms: I,
tempid_set: InternSet<TempId>
) -> Result<TxReport, Error> where
I: IntoIterator<Item = Term<Either<KnownEntid, Rc<TempId>>, Either<TypedValue, Rc<TempId>>>>,
[src]
pub fn transact_terms<I>(
&mut self,
terms: I,
tempid_set: InternSet<TempId>
) -> Result<TxReport, Error> where
I: IntoIterator<Item = Term<Either<KnownEntid, Rc<TempId>>, Either<TypedValue, Rc<TempId>>>>,
pub fn transact_entities<I, V>(
&mut self,
entities: I
) -> Result<TxReport, Error> where
I: IntoIterator<Item = Entity<V>>,
V: TransactableValue,
[src]
pub fn transact_entities<I, V>(
&mut self,
entities: I
) -> Result<TxReport, Error> where
I: IntoIterator<Item = Entity<V>>,
V: TransactableValue,
pub fn transact<B>(&mut self, transaction: B) -> Result<TxReport, Error> where
B: Borrow<str>,
[src]
pub fn transact<B>(&mut self, transaction: B) -> Result<TxReport, Error> where
B: Borrow<str>,
pub fn import<P>(&mut self, path: P) -> Result<TxReport, Error> where
P: AsRef<Path>,
[src]
pub fn import<P>(&mut self, path: P) -> Result<TxReport, Error> where
P: AsRef<Path>,
pub fn rollback(self) -> Result<(), Error>
[src]
pub fn rollback(self) -> Result<(), Error>
pub fn commit(self) -> Result<(), Error>
[src]
pub fn commit(self) -> Result<(), Error>
pub fn cache(
&mut self,
attribute: &Keyword,
cache_direction: CacheDirection,
cache_action: CacheAction
) -> Result<(), Error>
[src]
pub fn cache(
&mut self,
attribute: &Keyword,
cache_direction: CacheDirection,
cache_action: CacheAction
) -> Result<(), Error>
Trait Implementations
impl<'a, 'c> Pullable for InProgress<'a, 'c>
[src]
impl<'a, 'c> Pullable for InProgress<'a, 'c>
fn pull_attributes_for_entities<E, A>(
&self,
entities: E,
attributes: A
) -> Result<BTreeMap<i64, Arc<StructuredMap>>, Error> where
A: IntoIterator<Item = i64>,
E: IntoIterator<Item = i64>,
[src]
fn pull_attributes_for_entities<E, A>(
&self,
entities: E,
attributes: A
) -> Result<BTreeMap<i64, Arc<StructuredMap>>, Error> where
A: IntoIterator<Item = i64>,
E: IntoIterator<Item = i64>,
fn pull_attributes_for_entity<A>(
&self,
entity: i64,
attributes: A
) -> Result<StructuredMap, Error> where
A: IntoIterator<Item = i64>,
[src]
fn pull_attributes_for_entity<A>(
&self,
entity: i64,
attributes: A
) -> Result<StructuredMap, Error> where
A: IntoIterator<Item = i64>,
impl<'a, 'c> VersionedStore for InProgress<'a, 'c>
[src]
impl<'a, 'c> VersionedStore for InProgress<'a, 'c>
fn ensure_vocabulary(
&mut self,
definition: &Definition
) -> Result<VocabularyOutcome, Error>
[src]
fn ensure_vocabulary(
&mut self,
definition: &Definition
) -> Result<VocabularyOutcome, Error>
Check whether the provided vocabulary is present in the store. If it isn't, make it so.
fn ensure_vocabularies(
&mut self,
vocabularies: &mut VocabularySource
) -> Result<BTreeMap<Keyword, VocabularyOutcome>, Error>
[src]
fn ensure_vocabularies(
&mut self,
vocabularies: &mut VocabularySource
) -> Result<BTreeMap<Keyword, VocabularyOutcome>, Error>
Check whether the provided vocabularies are present in the store at the correct version and with all defined attributes. If any are not, invoke the pre
function on the provided VocabularySource
, install or upgrade the necessary vocabularies, then invoke post
. Returns Ok
if all of these steps succeed. Read more
fn check_vocabulary(
&self,
definition: &'definition Definition
) -> Result<VocabularyCheck<'definition>, Error>
[src]
fn check_vocabulary(
&self,
definition: &'definition Definition
) -> Result<VocabularyCheck<'definition>, Error>
Check whether the vocabulary described by the provided metadata is present in the store.
fn verify_core_schema(&self) -> Result<(), Error>
[src]
fn verify_core_schema(&self) -> Result<(), Error>
Make sure that our expectations of the core vocabulary — basic types and attributes — are met.
impl<'a, 'c> Queryable for InProgress<'a, 'c>
[src]
impl<'a, 'c> Queryable for InProgress<'a, 'c>
fn q_once<T>(&self, query: &str, inputs: T) -> Result<QueryOutput, Error> where
T: Into<Option<QueryInputs>>,
[src]
fn q_once<T>(&self, query: &str, inputs: T) -> Result<QueryOutput, Error> where
T: Into<Option<QueryInputs>>,
fn q_prepare<T>(&self, query: &str, inputs: T) -> Result<PreparedQuery, Error> where
T: Into<Option<QueryInputs>>,
[src]
fn q_prepare<T>(&self, query: &str, inputs: T) -> Result<PreparedQuery, Error> where
T: Into<Option<QueryInputs>>,
fn q_explain<T>(
&self,
query: &str,
inputs: T
) -> Result<QueryExplanation, Error> where
T: Into<Option<QueryInputs>>,
[src]
fn q_explain<T>(
&self,
query: &str,
inputs: T
) -> Result<QueryExplanation, Error> where
T: Into<Option<QueryInputs>>,
fn lookup_values_for_attribute<E>(
&self,
entity: E,
attribute: &Keyword
) -> Result<Vec<TypedValue>, Error> where
E: Into<i64>,
[src]
fn lookup_values_for_attribute<E>(
&self,
entity: E,
attribute: &Keyword
) -> Result<Vec<TypedValue>, Error> where
E: Into<i64>,
fn lookup_value_for_attribute<E>(
&self,
entity: E,
attribute: &Keyword
) -> Result<Option<TypedValue>, Error> where
E: Into<i64>,
[src]
fn lookup_value_for_attribute<E>(
&self,
entity: E,
attribute: &Keyword
) -> Result<Option<TypedValue>, Error> where
E: Into<i64>,
impl<'a, 'c> HasSchema for InProgress<'a, 'c>
[src]
impl<'a, 'c> HasSchema for InProgress<'a, 'c>
fn entid_for_type(&self, t: ValueType) -> Option<KnownEntid>
[src]
fn entid_for_type(&self, t: ValueType) -> Option<KnownEntid>
fn get_ident<T>(&self, x: T) -> Option<&Keyword> where
T: Into<i64>,
[src]
fn get_ident<T>(&self, x: T) -> Option<&Keyword> where
T: Into<i64>,
fn get_entid(&self, x: &Keyword) -> Option<KnownEntid>
[src]
fn get_entid(&self, x: &Keyword) -> Option<KnownEntid>
fn attribute_for_entid<T>(&self, x: T) -> Option<&Attribute> where
T: Into<i64>,
[src]
fn attribute_for_entid<T>(&self, x: T) -> Option<&Attribute> where
T: Into<i64>,
fn attribute_for_ident(
&self,
ident: &Keyword
) -> Option<(&Attribute, KnownEntid)>
[src]
fn attribute_for_ident(
&self,
ident: &Keyword
) -> Option<(&Attribute, KnownEntid)>
fn is_attribute<T>(&self, x: T) -> bool where
T: Into<i64>,
[src]
fn is_attribute<T>(&self, x: T) -> bool where
T: Into<i64>,
Return true if the provided entid identifies an attribute in this schema.
fn identifies_attribute(&self, x: &Keyword) -> bool
[src]
fn identifies_attribute(&self, x: &Keyword) -> bool
Return true if the provided ident identifies an attribute in this schema.
fn component_attributes(&self) -> &[i64]
[src]
fn component_attributes(&self) -> &[i64]
Auto Trait Implementations
impl<'a, 'c> !Send for InProgress<'a, 'c>
impl<'a, 'c> !Send for InProgress<'a, 'c>
impl<'a, 'c> !Sync for InProgress<'a, 'c>
impl<'a, 'c> !Sync for InProgress<'a, 'c>