Type Alias mithril_persistence::sqlite::SqliteConnection
source · pub type SqliteConnection = ConnectionThreadSafe;
Expand description
Type of the connection used in Mithril
Aliased Type§
struct SqliteConnection(/* private fields */);
Trait Implementations§
source§impl ConnectionExtensions for SqliteConnection
impl ConnectionExtensions for SqliteConnection
source§fn begin_transaction(&self) -> StdResult<Transaction<'_>>
fn begin_transaction(&self) -> StdResult<Transaction<'_>>
Begin a transaction on the connection.
source§fn query_single_cell<Q: AsRef<str>, T: ReadableWithIndex>(
&self,
sql: Q,
params: &[Value],
) -> StdResult<T>
fn query_single_cell<Q: AsRef<str>, T: ReadableWithIndex>( &self, sql: Q, params: &[Value], ) -> StdResult<T>
Execute the given sql query and return the value of the first cell read.
source§fn fetch<Q: Query>(&self, query: Q) -> StdResult<EntityCursor<'_, Q::Entity>>
fn fetch<Q: Query>(&self, query: Q) -> StdResult<EntityCursor<'_, Q::Entity>>
Fetch entities from the database using the given query.
source§fn fetch_first<Q: Query>(&self, query: Q) -> StdResult<Option<Q::Entity>>
fn fetch_first<Q: Query>(&self, query: Q) -> StdResult<Option<Q::Entity>>
Fetch the first entity from the database returned using the given query.
source§fn fetch_collect<Q: Query, B: FromIterator<Q::Entity>>(
&self,
query: Q,
) -> StdResult<B>
fn fetch_collect<Q: Query, B: FromIterator<Q::Entity>>( &self, query: Q, ) -> StdResult<B>
Fetch entities from the database using the given query and collect the result in a collection.