Struct fce_sqlite_connector::Connection [−][src]
pub struct Connection { /* fields omitted */ }
A database connection.
Implementations
impl Connection
[src]
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]
path: T,
flags: OpenFlags
) -> Result<Connection>
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]
F: FnMut(&[(&str, Option<&str>)]) -> bool,
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 Drop for Connection
[src]impl Send for Connection
[src]
impl Send for Connection
[src]Auto Trait Implementations
impl RefUnwindSafe for Connection
impl RefUnwindSafe for Connection
impl Sync for Connection
impl Sync for Connection
impl Unpin for Connection
impl Unpin for Connection
impl UnwindSafe for Connection
impl UnwindSafe for Connection