pub enum InsertData {
Values(Vec<Spanned<Expr>>),
Rows {
rows: Vec<Vec<(Spanned<Idiom>, Spanned<Expr>)>>,
misaligned: Option<Spanned<(usize, usize)>>,
},
Assignments(Vec<(Spanned<Idiom>, Spanned<Expr>)>),
Partial(PartialNode),
}Expand description
INSERT’s payload forms — distinct from the other mutations’ DataClause
(the grammar gives INSERT BulkInsert/FieldAssignment children the
others don’t have).
Variants§
Values(Vec<Spanned<Expr>>)
Object or array-of-objects payload.
Rows
INSERT INTO t (a, b) VALUES (...), (...) — each row is lowered to
(column, value) pairs so columns and values cannot misalign.
The grammar flattens all rows’ values into one sequence, so when the
total doesn’t divide evenly by the column count the leftover cannot
be paired: misaligned carries the raw (values, columns) counts
with the statement’s span for the arity finding.
Fields
Assignments(Vec<(Spanned<Idiom>, Spanned<Expr>)>)
INSERT ... SET-style field assignments.
Partial(PartialNode)
A payload that failed to lower.
Trait Implementations§
Source§impl Clone for InsertData
impl Clone for InsertData
Source§fn clone(&self) -> InsertData
fn clone(&self) -> InsertData
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 InsertData
impl Debug for InsertData
Source§impl PartialEq for InsertData
impl PartialEq for InsertData
impl StructuralPartialEq for InsertData
Auto Trait Implementations§
impl Freeze for InsertData
impl RefUnwindSafe for InsertData
impl Send for InsertData
impl Sync for InsertData
impl Unpin for InsertData
impl UnsafeUnpin for InsertData
impl UnwindSafe for InsertData
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