pub struct OnConflictClause {
pub target: Vec<String>,
pub action: OnConflictAction,
}Expand description
Parsed ON CONFLICT (cols) DO ... clause attached to an INSERT.
v0.6.0 Tier 1 #3 — the scope is deliberately narrow:
targetis a list of column names (noON CONSTRAINT <name>form yet; we’d add it via a new variant if required)actionis either DO NOTHING or DO UPDATE SET … with no WHERE clause (PostgreSQL supports conditional DO UPDATE; we intentionally defer that until a concrete compliance customer asks for it to keep the kernel surface minimal)
Fields§
§target: Vec<String>Columns that together form the conflict key. Typically the primary key; can be any subset that matches a unique constraint when those land (post-v0.6).
action: OnConflictActionWhat to do when a row at target already exists.
Trait Implementations§
Source§impl Clone for OnConflictClause
impl Clone for OnConflictClause
Source§fn clone(&self) -> OnConflictClause
fn clone(&self) -> OnConflictClause
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 OnConflictClause
impl Debug for OnConflictClause
Source§impl PartialEq for OnConflictClause
impl PartialEq for OnConflictClause
Source§fn eq(&self, other: &OnConflictClause) -> bool
fn eq(&self, other: &OnConflictClause) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for OnConflictClause
impl StructuralPartialEq for OnConflictClause
Auto Trait Implementations§
impl Freeze for OnConflictClause
impl RefUnwindSafe for OnConflictClause
impl Send for OnConflictClause
impl Sync for OnConflictClause
impl Unpin for OnConflictClause
impl UnsafeUnpin for OnConflictClause
impl UnwindSafe for OnConflictClause
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