[][src]Struct fce_sqlite_connector::Connection

pub struct Connection { /* fields omitted */ }

A database connection.

Implementations

impl Connection[src]

pub fn open<T: AsRef<Path>>(path: T) -> Result<Connection>[src]

Open a read-write connection to a new or existing database.

pub fn open_with_flags<T: AsRef<Path>>(
    path: T,
    flags: OpenFlags
) -> Result<Connection>
[src]

Open a database connection with specific flags.

pub fn execute<T: AsRef<str>>(&self, statement: T) -> Result<()>[src]

Execute a statement without processing the resulting rows if any.

pub fn iterate<T: AsRef<str>, F>(&self, statement: T, callback: F) -> Result<()> where
    F: FnMut(&[(&str, Option<&str>)]) -> bool
[src]

Execute a statement and process the resulting rows as plain text.

The callback is triggered for each row. If the callback returns false, no more rows will be processed. For large queries and non-string data types, prepared statement are highly preferable; see prepare.

pub fn prepare<T: AsRef<str>>(&self, statement: T) -> Result<Statement>[src]

Create a prepared statement.

pub fn changes(&self) -> usize[src]

Return the number of rows inserted, updated, or deleted by the most recent INSERT, UPDATE, or DELETE statement.

pub fn total_changes(&self) -> usize[src]

Return the total number of rows inserted, updated, and deleted by all INSERT, UPDATE, and DELETE statements since the connection was opened.

pub fn set_busy_timeout(&mut self, milliseconds: usize) -> Result<()>[src]

Set an implicit callback for handling busy events that tries to repeat rejected operations until a timeout expires.

pub fn as_raw(&self) -> u32[src]

Return the raw pointer.

Trait Implementations

impl Drop for Connection[src]

impl Send for Connection[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.