Struct mentat::store::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>
[src]
pub fn open(path: &str) -> Result<Store>
Open a store at the supplied path, ensuring that it includes the bootstrap schema.
pub fn open_empty(path: &str) -> Result<Store>
[src]
pub fn open_empty(path: &str) -> Result<Store>
Returns a totally blank store with no bootstrap schema. Use open
instead.
pub fn transact(&mut self, transaction: &str) -> Result<TxReport>
[src]
pub fn transact(&mut self, transaction: &str) -> Result<TxReport>
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>(&'m mut self) -> Result<InProgressRead<'m, 'm>>
[src]
pub fn begin_read<'m>(&'m mut self) -> Result<InProgressRead<'m, 'm>>
pub fn begin_transaction<'m>(&'m mut self) -> Result<InProgress<'m, 'm>>
[src]
pub fn begin_transaction<'m>(&'m mut self) -> Result<InProgress<'m, 'm>>
pub fn cache(&mut self, attr: &Keyword, direction: CacheDirection) -> Result<()>
[src]
pub fn cache(&mut self, attr: &Keyword, direction: CacheDirection) -> Result<()>
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> where
T: Into<Option<QueryInputs>>,
[src]
fn q_once<T>(&self, query: &str, inputs: T) -> Result<QueryOutput> where
T: Into<Option<QueryInputs>>,
fn q_prepare<T>(&self, query: &str, inputs: T) -> PreparedResult where
T: Into<Option<QueryInputs>>,
[src]
fn q_prepare<T>(&self, query: &str, inputs: T) -> PreparedResult where
T: Into<Option<QueryInputs>>,
fn q_explain<T>(&self, query: &str, inputs: T) -> Result<QueryExplanation> where
T: Into<Option<QueryInputs>>,
[src]
fn q_explain<T>(&self, query: &str, inputs: T) -> Result<QueryExplanation> where
T: Into<Option<QueryInputs>>,
fn lookup_values_for_attribute<E>(
&self,
entity: E,
attribute: &Keyword
) -> Result<Vec<TypedValue>> where
E: Into<Entid>,
[src]
fn lookup_values_for_attribute<E>(
&self,
entity: E,
attribute: &Keyword
) -> Result<Vec<TypedValue>> where
E: Into<Entid>,
fn lookup_value_for_attribute<E>(
&self,
entity: E,
attribute: &Keyword
) -> Result<Option<TypedValue>> where
E: Into<Entid>,
[src]
fn lookup_value_for_attribute<E>(
&self,
entity: E,
attribute: &Keyword
) -> Result<Option<TypedValue>> where
E: Into<Entid>,
impl Pullable for Store
[src]
impl Pullable for Store
fn pull_attributes_for_entities<E, A>(
&self,
entities: E,
attributes: A
) -> Result<BTreeMap<Entid, ValueRc<StructuredMap>>> where
E: IntoIterator<Item = Entid>,
A: IntoIterator<Item = Entid>,
[src]
fn pull_attributes_for_entities<E, A>(
&self,
entities: E,
attributes: A
) -> Result<BTreeMap<Entid, ValueRc<StructuredMap>>> where
E: IntoIterator<Item = Entid>,
A: IntoIterator<Item = Entid>,
fn pull_attributes_for_entity<A>(
&self,
entity: Entid,
attributes: A
) -> Result<StructuredMap> where
A: IntoIterator<Item = Entid>,
[src]
fn pull_attributes_for_entity<A>(
&self,
entity: Entid,
attributes: A
) -> Result<StructuredMap> where
A: IntoIterator<Item = Entid>,
impl Syncable for Store
[src]
impl Syncable for Store