pub struct SqlitePrepared<'a> { /* private fields */ }Expand description
A prepared statement backed by the connection-level LRU cache.
On each execute() call the cached limbo::Statement is retrieved (or
compiled fresh on a miss), executed, and returned to the cache. Because
Statement::reset() now zeroes n_change, every execution sees a correct
change count without re-parsing the SQL.
Trait Implementations§
Source§impl<'a> PreparedStatement for SqlitePrepared<'a>
impl<'a> PreparedStatement for SqlitePrepared<'a>
Source§fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
params: &'life1 [&'life2 dyn ToSqlValue],
) -> Pin<Box<dyn Future<Output = Result<u64, OxiSqlError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
params: &'life1 [&'life2 dyn ToSqlValue],
) -> Pin<Box<dyn Future<Output = Result<u64, OxiSqlError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Execute the prepared statement and return the number of rows affected.
Source§fn query<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
params: &'life1 [&'life2 dyn ToSqlValue],
) -> Pin<Box<dyn Future<Output = Result<Vec<Row>, OxiSqlError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn query<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
params: &'life1 [&'life2 dyn ToSqlValue],
) -> Pin<Box<dyn Future<Output = Result<Vec<Row>, OxiSqlError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Execute the prepared statement as a
SELECT and return all result rows.Auto Trait Implementations§
impl<'a> Freeze for SqlitePrepared<'a>
impl<'a> RefUnwindSafe for SqlitePrepared<'a>
impl<'a> Send for SqlitePrepared<'a>
impl<'a> Sync for SqlitePrepared<'a>
impl<'a> Unpin for SqlitePrepared<'a>
impl<'a> UnsafeUnpin for SqlitePrepared<'a>
impl<'a> UnwindSafe for SqlitePrepared<'a>
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
Mutably borrows from an owned value. Read more