pub struct Transaction { /* private fields */ }
Available on crate feature
mock
only.Expand description
Defines a database transaction as it holds a Vec<Statement>
Implementationsยง
Sourceยงimpl Transaction
impl Transaction
Sourcepub fn from_sql_and_values<I, T>(
db_backend: DbBackend,
sql: T,
values: I,
) -> Self
pub fn from_sql_and_values<I, T>( db_backend: DbBackend, sql: T, values: I, ) -> Self
Get the Values from s raw SQL statement depending on the DatabaseBackend
Sourcepub fn many<I>(stmts: I) -> Selfwhere
I: IntoIterator<Item = Statement>,
pub fn many<I>(stmts: I) -> Selfwhere
I: IntoIterator<Item = Statement>,
Create a Transaction with many statements
Sourcepub fn wrap<I>(stmts: I) -> Vec<Self>where
I: IntoIterator<Item = Statement>,
pub fn wrap<I>(stmts: I) -> Vec<Self>where
I: IntoIterator<Item = Statement>,
Wrap each Statement as a single-statement Transaction
Trait Implementationsยง
Sourceยงimpl Clone for Transaction
impl Clone for Transaction
Sourceยงfn clone(&self) -> Transaction
fn clone(&self) -> Transaction
Returns a copy of the value. Read more
1.0.0 ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSourceยงimpl Debug for Transaction
impl Debug for Transaction
Sourceยงimpl PartialEq for Transaction
impl PartialEq for Transaction
impl StructuralPartialEq for Transaction
Auto Trait Implementationsยง
impl Freeze for Transaction
impl RefUnwindSafe for Transaction
impl Send for Transaction
impl Sync for Transaction
impl Unpin for Transaction
impl UnwindSafe for Transaction
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
Sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Sourceยงunsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
๐ฌThis is a nightly-only experimental API. (
clone_to_uninit
)Sourceยงimpl<T> Instrument for T
impl<T> Instrument for T
Sourceยงfn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Sourceยง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