Struct mentat_ffi::Store
[−]
[src]
pub struct Store { /* fields omitted */ }
A convenience wrapper around a single SQLite connection and a Conn. This is suitable for applications that don't require complex connection management.
Methods
impl Store
[src]
impl Store
pub fn open(path: &str) -> Result<Store, MentatError>
[src]
pub fn open(path: &str) -> Result<Store, MentatError>
Open a store at the supplied path, ensuring that it includes the bootstrap schema.
pub fn open_empty(path: &str) -> Result<Store, MentatError>
[src]
pub fn open_empty(path: &str) -> Result<Store, MentatError>
Returns a totally blank store with no bootstrap schema. Use open
instead.
pub fn transact(&mut self, transaction: &str) -> Result<TxReport, MentatError>
[src]
pub fn transact(&mut self, transaction: &str) -> Result<TxReport, MentatError>
impl Store
[src]
impl Store
pub fn sqlite_mut(&mut self) -> &mut Connection
[src]
pub fn sqlite_mut(&mut self) -> &mut Connection
Intended for use from tests.
impl Store
[src]
impl Store
pub fn dismantle(self) -> (Connection, Conn)
[src]
pub fn dismantle(self) -> (Connection, Conn)
pub fn conn(&self) -> &Conn
[src]
pub fn conn(&self) -> &Conn
pub fn begin_read(&'m mut self) -> Result<InProgressRead<'m, 'm>, MentatError>
[src]
pub fn begin_read(&'m mut self) -> Result<InProgressRead<'m, 'm>, MentatError>
pub fn begin_transaction(
&'m mut self
) -> Result<InProgress<'m, 'm>, MentatError>
[src]
pub fn begin_transaction(
&'m mut self
) -> Result<InProgress<'m, 'm>, MentatError>
pub fn cache(
&mut self,
attr: &Keyword,
direction: CacheDirection
) -> Result<(), MentatError>
[src]
pub fn cache(
&mut self,
attr: &Keyword,
direction: CacheDirection
) -> Result<(), MentatError>
pub fn register_observer(&mut self, key: String, observer: Arc<TxObserver>)
[src]
pub fn register_observer(&mut self, key: String, observer: Arc<TxObserver>)
pub fn unregister_observer(&mut self, key: &String)
[src]
pub fn unregister_observer(&mut self, key: &String)
Trait Implementations
impl Queryable for Store
[src]
impl Queryable for Store
fn q_once<T>(&self, query: &str, inputs: T) -> Result<QueryOutput, MentatError> where
T: Into<Option<QueryInputs>>,
[src]
fn q_once<T>(&self, query: &str, inputs: T) -> Result<QueryOutput, MentatError> where
T: Into<Option<QueryInputs>>,
fn q_prepare<T>(
&self,
query: &str,
inputs: T
) -> Result<PreparedQuery, MentatError> where
T: Into<Option<QueryInputs>>,
[src]
fn q_prepare<T>(
&self,
query: &str,
inputs: T
) -> Result<PreparedQuery, MentatError> where
T: Into<Option<QueryInputs>>,
fn q_explain<T>(
&self,
query: &str,
inputs: T
) -> Result<QueryExplanation, MentatError> where
T: Into<Option<QueryInputs>>,
[src]
fn q_explain<T>(
&self,
query: &str,
inputs: T
) -> Result<QueryExplanation, MentatError> where
T: Into<Option<QueryInputs>>,
fn lookup_values_for_attribute<E>(
&self,
entity: E,
attribute: &Keyword
) -> Result<Vec<TypedValue>, MentatError> where
E: Into<i64>,
[src]
fn lookup_values_for_attribute<E>(
&self,
entity: E,
attribute: &Keyword
) -> Result<Vec<TypedValue>, MentatError> where
E: Into<i64>,
fn lookup_value_for_attribute<E>(
&self,
entity: E,
attribute: &Keyword
) -> Result<Option<TypedValue>, MentatError> where
E: Into<i64>,
[src]
fn lookup_value_for_attribute<E>(
&self,
entity: E,
attribute: &Keyword
) -> Result<Option<TypedValue>, MentatError> where
E: Into<i64>,
impl Syncable for Store
[src]
impl Syncable for Store
impl Pullable for Store
[src]
impl Pullable for Store
fn pull_attributes_for_entities<E, A>(
&self,
entities: E,
attributes: A
) -> Result<BTreeMap<i64, Arc<StructuredMap>>, MentatError> 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>>, MentatError> where
A: IntoIterator<Item = i64>,
E: IntoIterator<Item = i64>,
fn pull_attributes_for_entity<A>(
&self,
entity: i64,
attributes: A
) -> Result<StructuredMap, MentatError> where
A: IntoIterator<Item = i64>,
[src]
fn pull_attributes_for_entity<A>(
&self,
entity: i64,
attributes: A
) -> Result<StructuredMap, MentatError> where
A: IntoIterator<Item = i64>,