Struct diesel::prelude::SqliteConnection [] [src]

pub struct SqliteConnection { /* fields omitted */ }

Connections for the SQLite backend. Unlike other backends, "connection URLs" for SQLite are file paths or special identifiers like :memory.

Methods

impl SqliteConnection
[src]

[src]

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(())
})

[src]

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]

[src]

Execute this command

impl<'a, T, U, Op> ExecuteDsl<SqliteConnection> for InsertStatement<T, BatchInsert<'a, U, T>, Op> where
    InsertStatement<T, &'a [U], Op>: ExecuteDsl<SqliteConnection>, 
[src]

[src]

Execute this command

impl Send for SqliteConnection
[src]

impl SimpleConnection for SqliteConnection
[src]

[src]

Execute multiple SQL statements within the same string. Read more

impl Connection for SqliteConnection
[src]

The backend this type connects to

[src]

Establishes a new connection to the database Read more

[src]

Executes the given function inside of a database transaction Read more

[src]

Creates a transaction that will never be committed. This is useful for tests. Panics if called while inside of a transaction. Read more

[src]

Executes the given function inside a transaction, but does not commit it. Panics if the given function returns an error. Read more

Auto Trait Implementations