pub struct SqliteConnection { /* private fields */ }
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

The backend this type connects to
Establishes a new connection to the database Read more
Executes the given function inside of a database transaction Read more
Creates a transaction that will never be committed. This is useful for tests. Panics if called while inside of a transaction. Read more
Executes the given function inside a transaction, but does not commit it. Panics if the given function returns an error. Read more
Execute multiple SQL statements within the same string. Read more
See the traits documentation.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Convert self to an expression for Diesel’s query builder. Read more
Convert &self to an expression for Diesel’s query builder. Read more
The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more