pub struct SQLiteTransaction<'c> { /* private fields */ }Implementations§
Source§impl<'c> SQLiteTransaction<'c>
impl<'c> SQLiteTransaction<'c>
pub async fn new(connection: &'c mut SQLiteConnection) -> Result<Self>
Trait Implementations§
Source§impl<'c> Executor for SQLiteTransaction<'c>
impl<'c> Executor for SQLiteTransaction<'c>
Source§type Driver = SQLiteDriver
type Driver = SQLiteDriver
Associated driver.
Source§fn accepts_multiple_statements(&self) -> bool
fn accepts_multiple_statements(&self) -> bool
Checks if the driver supports multiple SQL statements in a single request.
Source§fn do_prepare(
&mut self,
sql: String,
) -> impl Future<Output = Result<Query<Self::Driver>>> + Send
fn do_prepare( &mut self, sql: String, ) -> impl Future<Output = Result<Query<Self::Driver>>> + Send
Internal hook for implementing prepared statement support.
Source§fn run<'s>(
&'s mut self,
query: impl AsQuery<Self::Driver> + 's,
) -> impl Stream<Item = Result<QueryResult>> + Send
fn run<'s>( &'s mut self, query: impl AsQuery<Self::Driver> + 's, ) -> impl Stream<Item = Result<QueryResult>> + Send
Executes a query and streams the results (rows or affected counts).
Source§fn fetch<'s>(
&'s mut self,
query: impl AsQuery<Self::Driver> + 's,
) -> impl Stream<Item = Result<Row>> + Send + 's
fn fetch<'s>( &'s mut self, query: impl AsQuery<Self::Driver> + 's, ) -> impl Stream<Item = Result<Row>> + Send + 's
Executes a query and streams the resulting rows, ignoring affected counts.
Source§fn execute<'s>(
&'s mut self,
query: impl AsQuery<Self::Driver> + 's,
) -> impl Future<Output = Result<RowsAffected>> + Send
fn execute<'s>( &'s mut self, query: impl AsQuery<Self::Driver> + 's, ) -> impl Future<Output = Result<RowsAffected>> + Send
Executes a query and returns the total number of affected rows.
Source§fn append<'a, E, It>(
&mut self,
entities: It,
) -> impl Future<Output = Result<RowsAffected>> + Send
fn append<'a, E, It>( &mut self, entities: It, ) -> impl Future<Output = Result<RowsAffected>> + Send
Efficiently inserts a collection of entities bypassing regular SQL execution when supported by the driver.
Auto Trait Implementations§
impl<'c> Freeze for SQLiteTransaction<'c>
impl<'c> RefUnwindSafe for SQLiteTransaction<'c>
impl<'c> Send for SQLiteTransaction<'c>
impl<'c> Sync for SQLiteTransaction<'c>
impl<'c> Unpin for SQLiteTransaction<'c>
impl<'c> UnsafeUnpin for SQLiteTransaction<'c>
impl<'c> !UnwindSafe for SQLiteTransaction<'c>
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