pub type SqliteConnection = ConnectionThreadSafe;Expand description
Type of the connection used in Mithril
Aliased Type§
pub 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.