Struct diesel::prelude::SqliteConnection [−][src]
pub struct SqliteConnection { /* fields omitted */ }
Expand description
Connections for the SQLite backend. Unlike other backends, “connection URLs”
for SQLite are file paths, URIs, or special
identifiers like :memory:
.
Implementations
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(()) })
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, <SqliteConnection as Connection>::Backend> 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, <SqliteConnection as Connection>::Backend> 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,
Execute this command
impl<'a, T, U, Op> ExecuteDsl<SqliteConnection, <SqliteConnection as Connection>::Backend> for InsertStatement<T, BatchInsert<'a, U, T>, Op> where
InsertStatement<T, &'a [U], Op>: ExecuteDsl<SqliteConnection>,
impl<'a, T, U, Op> ExecuteDsl<SqliteConnection, <SqliteConnection as Connection>::Backend> for InsertStatement<T, BatchInsert<'a, U, T>, Op> where
InsertStatement<T, &'a [U], Op>: ExecuteDsl<SqliteConnection>,
Execute this command
Execute multiple SQL statements within the same string. Read more
impl<Changes, Output> UpdateAndFetchResults<Changes, Output> for SqliteConnection where
Changes: Copy + Identifiable,
Changes: AsChangeset<Target = <Changes as HasTable>::Table> + IntoUpdateTarget,
Changes::Table: FindDsl<Changes::Id>,
Update<Changes, Changes>: ExecuteDsl<SqliteConnection>,
Find<Changes::Table, Changes::Id>: LoadQuery<SqliteConnection, Output>,
impl<Changes, Output> UpdateAndFetchResults<Changes, Output> for SqliteConnection where
Changes: Copy + Identifiable,
Changes: AsChangeset<Target = <Changes as HasTable>::Table> + IntoUpdateTarget,
Changes::Table: FindDsl<Changes::Id>,
Update<Changes, Changes>: ExecuteDsl<SqliteConnection>,
Find<Changes::Table, Changes::Id>: LoadQuery<SqliteConnection, Output>,
See the traits documentation.