Struct photon_indexer::migration::sea_orm::Transaction
source · pub struct Transaction { /* private fields */ }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>(
db_backend: DatabaseBackend,
sql: &str,
values: I
) -> Transactionwhere
I: IntoIterator<Item = Value>,
pub fn from_sql_and_values<I>(
db_backend: DatabaseBackend,
sql: &str,
values: I
) -> Transactionwhere
I: IntoIterator<Item = Value>,
Get the Values from s raw SQL statement depending on the DatabaseBackend
sourcepub fn one(stmt: Statement) -> Transaction
pub fn one(stmt: Statement) -> Transaction
Create a Transaction with one statement
sourcepub fn many<I>(stmts: I) -> Transactionwhere
I: IntoIterator<Item = Statement>,
pub fn many<I>(stmts: I) -> Transactionwhere
I: IntoIterator<Item = Statement>,
Create a Transaction with many statements
sourcepub fn wrap<I>(stmts: I) -> Vec<Transaction>where
I: IntoIterator<Item = Statement>,
pub fn wrap<I>(stmts: I) -> Vec<Transaction>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
source§fn eq(&self, other: &Transaction) -> bool
fn eq(&self, other: &Transaction) -> bool
This method tests for
self and other values to be equal, and is used
by ==.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<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> 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