Struct r2d2_sqlite::SqliteConnectionManager [] [src]

pub struct SqliteConnectionManager {
    // some fields omitted
}

An r2d2::ManageConnection for rusqlite::Connections.

Methods

impl SqliteConnectionManager
[src]

fn new(database: &str) -> Self

Creates a new SqliteConnectionManager from file.

See rusqlite::Connection::open

fn new_with_flags(database: &str, flags: OpenFlags) -> Self

Creates a new SqliteConnectionManager from file with open flags.

See rusqlite::Connection::open_with_flags

fn new_in_memory() -> Self

Creates a new SqliteConnectionManager in memory.

See rusqlite::Connection::open_in_memory

fn new_in_memory_with_flags(flags: OpenFlags) -> Self

Creates a new SqliteConnectionManager in memory with open flags.

See rusqlite::Connection::open_in_memory_with_flags

Trait Implementations

impl ManageConnection for SqliteConnectionManager
[src]

type Connection = Connection

The connection type this manager deals with.

type Error = Error

The error type returned by Connections.

fn connect(&self) -> Result<Connection, Error>

Attempts to create a new connection.

fn is_valid(&self, conn: &mut Connection) -> Result<()Error>

Determines if the connection is still connected to the database. Read more

fn has_broken(&self, _: &mut Connection) -> bool

Quickly determines if the connection is no longer usable. Read more