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, Error>
[src]
pub fn open(path: &str) -> Result<Store, Error>
Open a store at the supplied path, ensuring that it includes the bootstrap schema.
pub fn open_empty(path: &str) -> Result<Store, Error>
[src]
pub fn open_empty(path: &str) -> Result<Store, Error>
Returns a totally blank store with no bootstrap schema. Use open
instead.
pub fn transact(&mut self, transaction: &str) -> Result<TxReport, Error>
[src]
pub fn transact(&mut self, transaction: &str) -> Result<TxReport, Error>
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>, Error>
[src]
pub fn begin_read(&'m mut self) -> Result<InProgressRead<'m, 'm>, Error>
pub fn begin_transaction(&'m mut self) -> Result<InProgress<'m, 'm>, Error>
[src]
pub fn begin_transaction(&'m mut self) -> Result<InProgress<'m, 'm>, Error>
pub fn cache(
&mut self,
attr: &Keyword,
direction: CacheDirection
) -> Result<(), Error>
[src]
pub fn cache(
&mut self,
attr: &Keyword,
direction: CacheDirection
) -> Result<(), Error>
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 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>>, 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 Queryable for Store
[src]
impl Queryable for Store
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>,