pub struct Transaction { /* private fields */ }Expand description
A transaction represents a sequence of operations performed as a single logical unit of work.
Implementations§
Source§impl Transaction
impl Transaction
Sourcepub fn insert<T>(&mut self, values: Vec<(ColumnDef, Value)>) -> DbmsResult<()>where
T: TableSchema,
pub fn insert<T>(&mut self, values: Vec<(ColumnDef, Value)>) -> DbmsResult<()>where
T: TableSchema,
Inserts a new insert operation into the transaction.
Sourcepub fn update<T>(
&mut self,
patch: T::Update,
filter: Option<Filter>,
primary_keys: Vec<Value>,
) -> DbmsResult<()>where
T: TableSchema,
pub fn update<T>(
&mut self,
patch: T::Update,
filter: Option<Filter>,
primary_keys: Vec<Value>,
) -> DbmsResult<()>where
T: TableSchema,
Inserts a new update operation into the transaction.
Sourcepub fn delete<T>(
&mut self,
behaviour: DeleteBehavior,
filter: Option<Filter>,
primary_keys: Vec<Value>,
) -> DbmsResult<()>where
T: TableSchema,
pub fn delete<T>(
&mut self,
behaviour: DeleteBehavior,
filter: Option<Filter>,
primary_keys: Vec<Value>,
) -> DbmsResult<()>where
T: TableSchema,
Inserts a new delete operation into the transaction.
Sourcepub fn overlay(&self) -> &DatabaseOverlay
pub fn overlay(&self) -> &DatabaseOverlay
Returns a reference to the overlay.
Sourcepub fn overlay_mut(&mut self) -> &mut DatabaseOverlay
pub fn overlay_mut(&mut self) -> &mut DatabaseOverlay
Returns a mutable reference to the overlay.
Trait Implementations§
Source§impl Debug for Transaction
impl Debug for Transaction
Source§impl Default for Transaction
impl Default for Transaction
Source§fn default() -> Transaction
fn default() -> Transaction
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Transaction
impl RefUnwindSafe for Transaction
impl Send for Transaction
impl Sync for Transaction
impl Unpin for Transaction
impl UnsafeUnpin 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