[−][src]Struct quaint::connector::Transaction
A representation of an SQL database transaction. If not commited, a transaction will be rolled back by default when dropped.
Currently does not support nesting, so starting a new transaction using the transaction object will panic.
Methods
impl<'a> Transaction<'a>
[src]
pub async fn commit<'_>(&'_ self) -> Result<()>
[src]
Commit the changes to the database and consume the transaction.
pub async fn rollback<'_>(&'_ self) -> Result<()>
[src]
Rolls back the changes to the database.
Trait Implementations
impl<'a> Queryable for Transaction<'a>
[src]
ⓘImportant traits for DBIO<'a, T>fn execute<'b>(&'b self, q: Query<'b>) -> DBIO<'b, Option<Id>>
[src]
ⓘImportant traits for DBIO<'a, T>
ⓘImportant traits for DBIO<'a, T>fn query<'b>(&'b self, q: Query<'b>) -> DBIO<'b, ResultSet>
[src]
ⓘImportant traits for DBIO<'a, T>
ⓘImportant traits for DBIO<'a, T>fn query_raw<'b>(
&'b self,
sql: &'b str,
params: &'b [ParameterizedValue]
) -> DBIO<'b, ResultSet>
[src]
ⓘImportant traits for DBIO<'a, T>
&'b self,
sql: &'b str,
params: &'b [ParameterizedValue]
) -> DBIO<'b, ResultSet>
ⓘImportant traits for DBIO<'a, T>fn execute_raw<'b>(
&'b self,
sql: &'b str,
params: &'b [ParameterizedValue]
) -> DBIO<'b, u64>
[src]
ⓘImportant traits for DBIO<'a, T>
&'b self,
sql: &'b str,
params: &'b [ParameterizedValue]
) -> DBIO<'b, u64>
ⓘImportant traits for DBIO<'a, T>fn raw_cmd<'b>(&'b self, cmd: &'b str) -> DBIO<'b, ()>
[src]
ⓘImportant traits for DBIO<'a, T>
ⓘImportant traits for DBIO<'a, T>fn select<'a>(&'a self, q: Select<'a>) -> DBIO<'a, ResultSet>
[src]
ⓘImportant traits for DBIO<'a, T>
ⓘImportant traits for DBIO<'a, T>fn insert<'a>(&'a self, q: Insert<'a>) -> DBIO<'a, Option<Id>>
[src]
ⓘImportant traits for DBIO<'a, T>
ⓘImportant traits for DBIO<'a, T>fn update<'a>(&'a self, q: Update<'a>) -> DBIO<'a, ()>
[src]
ⓘImportant traits for DBIO<'a, T>
ⓘImportant traits for DBIO<'a, T>fn delete<'a>(&'a self, q: Delete<'a>) -> DBIO<'a, ()>
[src]
ⓘImportant traits for DBIO<'a, T>
Auto Trait Implementations
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
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,
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> Same<T> for T
type Output = T
Should always be Self
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,