pub struct SqlitePooledConnection(/* private fields */);
Expand description
SqliteConnection wrapper for a pooled connection
Implementations§
source§impl SqlitePooledConnection
impl SqlitePooledConnection
sourcepub fn new(connection: SqliteConnection) -> Self
pub fn new(connection: SqliteConnection) -> Self
Create a new SqlitePooledConnection
Methods from Deref<Target = Connection>§
pub fn execute<T>(&self, statement: T) -> Result<(), Error>
pub fn execute<T>(&self, statement: T) -> Result<(), Error>
Execute a statement without processing the resulting rows if any.
pub fn iterate<T, F>(&self, statement: T, callback: F) -> Result<(), Error>
pub fn iterate<T, F>(&self, statement: T, callback: F) -> Result<(), Error>
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 change_count(&self) -> usize
pub fn change_count(&self) -> usize
Return the number of rows inserted, updated, or deleted by the most recent INSERT, UPDATE, or DELETE statement.
pub fn total_change_count(&self) -> usize
pub fn total_change_count(&self) -> usize
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_handler<F>(&mut self, callback: F) -> Result<(), Error>
pub fn set_busy_handler<F>(&mut self, callback: F) -> Result<(), Error>
Set a callback for handling busy events.
The callback is triggered when the database cannot perform an operation due to processing
of some other request. If the callback returns true
, the operation will be repeated.
pub fn set_busy_timeout(&mut self, milliseconds: usize) -> Result<(), Error>
pub fn set_busy_timeout(&mut self, milliseconds: usize) -> Result<(), Error>
Set an implicit callback for handling busy events that tries to repeat rejected operations until a timeout expires.
pub fn remove_busy_handler(&mut self) -> Result<(), Error>
pub fn remove_busy_handler(&mut self) -> Result<(), Error>
Remove the callback handling busy events.
Trait Implementations§
source§impl Deref for SqlitePooledConnection
impl Deref for SqlitePooledConnection
Auto Trait Implementations§
impl Freeze for SqlitePooledConnection
impl !RefUnwindSafe for SqlitePooledConnection
impl Send for SqlitePooledConnection
impl Sync for SqlitePooledConnection
impl Unpin for SqlitePooledConnection
impl !UnwindSafe for SqlitePooledConnection
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more