pub struct Transaction<'a> { /* private fields */ }
Expand description
An asynchronous SQLite database transaction.
Implementations§
Source§impl<'a> Transaction<'a>
impl<'a> Transaction<'a>
Sourcepub async fn commit(self) -> Result<(), Error>
pub async fn commit(self) -> Result<(), Error>
Consumes the transaction, committing all changes made within it.
Sourcepub async fn rollback(self) -> Result<(), Error>
pub async fn rollback(self) -> Result<(), Error>
Rolls the transaction back, discarding all changes made within it.
Sourcepub async fn execute<S, A>(
&mut self,
statement: S,
arguments: A,
) -> Result<Status, Error>
pub async fn execute<S, A>( &mut self, statement: S, arguments: A, ) -> Result<Status, Error>
Executes a statement that does not return the resulting rows.
Returns an error if the query returns resulting rows.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Transaction<'a>
impl<'a> !RefUnwindSafe for Transaction<'a>
impl<'a> Send for Transaction<'a>
impl<'a> Sync for Transaction<'a>
impl<'a> Unpin for Transaction<'a>
impl<'a> !UnwindSafe for Transaction<'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