pub struct InsertStatement {
pub token: Token,
pub table_name: Identifier,
pub columns: Vec<Identifier>,
pub values: Vec<Vec<Expression>>,
pub select: Option<Box<SelectStatement>>,
pub on_duplicate: bool,
pub update_columns: Vec<Identifier>,
pub update_expressions: Vec<Expression>,
pub do_nothing: bool,
pub conflict_target: Vec<Identifier>,
pub returning: Vec<Expression>,
}Expand description
INSERT statement
Fields§
§token: Token§table_name: Identifier§columns: Vec<Identifier>§values: Vec<Vec<Expression>>VALUES clause rows (None if using SELECT)
select: Option<Box<SelectStatement>>SELECT statement for INSERT INTO … SELECT (None if using VALUES)
on_duplicate: boolON DUPLICATE KEY UPDATE (MySQL-style) or ON CONFLICT DO UPDATE (PostgreSQL-style)
update_columns: Vec<Identifier>§update_expressions: Vec<Expression>§do_nothing: boolON CONFLICT DO NOTHING (skip duplicates silently)
conflict_target: Vec<Identifier>Conflict target columns for ON CONFLICT (col1, col2, …)
returning: Vec<Expression>RETURNING clause expressions
Trait Implementations§
Source§impl Clone for InsertStatement
impl Clone for InsertStatement
Source§fn clone(&self) -> InsertStatement
fn clone(&self) -> InsertStatement
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 InsertStatement
impl Debug for InsertStatement
Source§impl Display for InsertStatement
impl Display for InsertStatement
Source§impl PartialEq for InsertStatement
impl PartialEq for InsertStatement
impl StructuralPartialEq for InsertStatement
Auto Trait Implementations§
impl Freeze for InsertStatement
impl RefUnwindSafe for InsertStatement
impl Send for InsertStatement
impl Sync for InsertStatement
impl Unpin for InsertStatement
impl UnsafeUnpin for InsertStatement
impl UnwindSafe for InsertStatement
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