Struct diesel::prelude::SqliteConnection [−][src]
Connections for the SQLite backend. Unlike other backends, "connection URLs"
for SQLite are file paths or special identifiers like :memory
.
Methods
impl SqliteConnection
[src]
[−]
impl SqliteConnection
pub fn immediate_transaction<T, E, F>(&self, f: F) -> Result<T, E> where
F: FnOnce() -> Result<T, E>,
E: From<Error>,
[src]
[−]
pub fn immediate_transaction<T, E, F>(&self, f: F) -> Result<T, E> where
F: FnOnce() -> Result<T, E>,
E: From<Error>,
Run a transaction with BEGIN IMMEDIATE
This method will return an error if a transaction is already open.
Example
conn.immediate_transaction(|| { // Do stuff in a transaction Ok(()) })
pub fn exclusive_transaction<T, E, F>(&self, f: F) -> Result<T, E> where
F: FnOnce() -> Result<T, E>,
E: From<Error>,
[src]
[−]
pub fn exclusive_transaction<T, E, F>(&self, f: F) -> Result<T, E> where
F: FnOnce() -> Result<T, E>,
E: From<Error>,
Run a transaction with BEGIN EXCLUSIVE
This method will return an error if a transaction is already open.
Example
conn.exclusive_transaction(|| { // Do stuff in a transaction Ok(()) })
Trait Implementations
impl<'a, T, U, Op> ExecuteDsl<SqliteConnection> for InsertStatement<T, &'a [U], Op> where
&'a U: Insertable<T>,
InsertStatement<T, <&'a U as Insertable<T>>::Values, Op>: QueryFragment<Sqlite>,
T: Copy,
Op: Copy,
[src]
[+]
impl<'a, T, U, Op> ExecuteDsl<SqliteConnection> for InsertStatement<T, &'a [U], Op> where
&'a U: Insertable<T>,
InsertStatement<T, <&'a U as Insertable<T>>::Values, Op>: QueryFragment<Sqlite>,
T: Copy,
Op: Copy,
impl<'a, T, U, Op> ExecuteDsl<SqliteConnection> for InsertStatement<T, BatchInsert<'a, U, T>, Op> where
InsertStatement<T, &'a [U], Op>: ExecuteDsl<SqliteConnection>,
[src]
[+]
impl<'a, T, U, Op> ExecuteDsl<SqliteConnection> for InsertStatement<T, BatchInsert<'a, U, T>, Op> where
InsertStatement<T, &'a [U], Op>: ExecuteDsl<SqliteConnection>,
impl<T, U, Op> ExecuteDsl<SqliteConnection> for InsertStatement<T, OwnedBatchInsert<ValuesClause<U, T>>, Op> where
InsertStatement<T, ValuesClause<U, T>, Op>: QueryFragment<Sqlite>,
T: Copy,
Op: Copy,
[src]
[+]
impl<T, U, Op> ExecuteDsl<SqliteConnection> for InsertStatement<T, OwnedBatchInsert<ValuesClause<U, T>>, Op> where
InsertStatement<T, ValuesClause<U, T>, Op>: QueryFragment<Sqlite>,
T: Copy,
Op: Copy,
impl Send for SqliteConnection
[src]
impl Send for SqliteConnection
impl SimpleConnection for SqliteConnection
[src]
[+]
impl SimpleConnection for SqliteConnection
impl Connection for SqliteConnection
[src]
[+]
impl Connection for SqliteConnection
Auto Trait Implementations
impl !Sync for SqliteConnection
impl !Sync for SqliteConnection