[−][src]Struct fce_sqlite_connector::Connection
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]
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
Auto Trait Implementations
impl RefUnwindSafe for Connection
impl Sync for Connection
impl Unpin for Connection
impl UnwindSafe for Connection
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,