pub struct SqliteConnectionManager { /* fields omitted */ }
An r2d2::ManageConnection
for rusqlite::Connection
s.
Creates a new SqliteConnectionManager
from file.
See rusqlite::Connection::open
Creates a new SqliteConnectionManager
from memory.
Converts SqliteConnectionManager
into one that sets OpenFlags upon
connection creation.
See rustqlite::OpenFlags
for a list of available flags.
Converts SqliteConnectionManager
into one that calls an initialization
function upon connection creation. Could be used to set PRAGMAs, for
example.
Make a SqliteConnectionManager
that sets the foreign_keys
pragma to
true for every connection.
let manager = SqliteConnectionManager::file("app.db")
.with_init(|c| c.execute_batch("PRAGMA foreign_keys=1;"));
Formats the value using the given formatter. Read more
The connection type this manager deals with.
The error type returned by Connection
s.
Attempts to create a new connection.
Determines if the connection is still connected to the database. Read more
Quickly determines if the connection is no longer usable. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static