pub struct TransactedDb<'c> {
pub(crate) transaction: Transaction<'c, Postgres>,
}Expand description
DB Queries inside a transaction
Fields§
§transaction: Transaction<'c, Postgres>what shall I say… the transaction.
Implementations§
Trait Implementations§
Source§impl<'c> Database for TransactedDb<'c>
impl<'c> Database for TransactedDb<'c>
Source§async fn begin_transaction<'d>(
&'d mut self,
) -> Result<TransactedDb<'d>, DatabaseError>
async fn begin_transaction<'d>( &'d mut self, ) -> Result<TransactedDb<'d>, DatabaseError>
Starts a nested transaction
Source§async fn connection(&mut self) -> Result<&mut RawPgConnection, DatabaseError>
async fn connection(&mut self) -> Result<&mut RawPgConnection, DatabaseError>
Acquires a new connection from the pool. Read more
Auto Trait Implementations§
impl<'c> !RefUnwindSafe for TransactedDb<'c>
impl<'c> !UnwindSafe for TransactedDb<'c>
impl<'c> Freeze for TransactedDb<'c>
impl<'c> Send for TransactedDb<'c>
impl<'c> Sync for TransactedDb<'c>
impl<'c> Unpin for TransactedDb<'c>
impl<'c> UnsafeUnpin for TransactedDb<'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
§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>
Converts
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>
Converts
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