pub enum OnConflictAction {
DoNothing,
DoUpdate {
assignments: Vec<(String, UpsertExpr)>,
},
}Expand description
The action to take when ON CONFLICT (target) fires.
Variants§
DoNothing
DO NOTHING — no mutation, rowsAffected = 0, but the audit log
still records the upsert attempt (via AuditAction::UpsertApplied
with resolution NoOp).
DoUpdate
DO UPDATE SET col = <expr>, ... — replace the conflicting row
with the result of evaluating each assignment. EXCLUDED.col
references the value from the would-be-inserted row.
Fields
§
assignments: Vec<(String, UpsertExpr)>Column assignments. EXCLUDED.col references are represented
as UpsertExpr::Excluded(col) so the tenant-layer dispatcher
can substitute values from the INSERT’s row payload.
Trait Implementations§
Source§impl Clone for OnConflictAction
impl Clone for OnConflictAction
Source§fn clone(&self) -> OnConflictAction
fn clone(&self) -> OnConflictAction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 OnConflictAction
impl Debug for OnConflictAction
Source§impl PartialEq for OnConflictAction
impl PartialEq for OnConflictAction
Source§fn eq(&self, other: &OnConflictAction) -> bool
fn eq(&self, other: &OnConflictAction) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for OnConflictAction
impl StructuralPartialEq for OnConflictAction
Auto Trait Implementations§
impl Freeze for OnConflictAction
impl RefUnwindSafe for OnConflictAction
impl Send for OnConflictAction
impl Sync for OnConflictAction
impl Unpin for OnConflictAction
impl UnsafeUnpin for OnConflictAction
impl UnwindSafe for OnConflictAction
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