pub struct InsertStmt {
pub table: String,
pub target_qualifier: String,
pub columns: Vec<String>,
pub with: Vec<CTE>,
pub rows: Vec<Vec<ValueExpr>>,
pub select_source: Option<Box<SelectStmt>>,
pub on_conflict: Option<OnConflict>,
pub returning: Vec<Projection>,
pub returning_aliases: ReturningAliases,
}Fields§
§table: String§target_qualifier: StringSQL-visible target relation name: explicit alias, otherwise the local relation name.
columns: Vec<String>§with: Vec<CTE>Common table expressions defined with WITH [RECURSIVE] ....
rows: Vec<Vec<ValueExpr>>Inline VALUES (...) (...) rows. Empty when the statement is
an INSERT ... SELECT form; in that case select_source is
populated with the underlying SELECT.
select_source: Option<Box<SelectStmt>>Populated when the statement is INSERT INTO t (...) SELECT ....
The engine materialises the inner select first and then writes
each row through the standard INSERT path.
on_conflict: Option<OnConflict>ON CONFLICT (...) DO ... clause. None for plain
INSERT INTO ... VALUES ... without conflict handling.
returning: Vec<Projection>RETURNING ... projection list. Empty when absent.
returning_aliases: ReturningAliasesPostgreSQL 18 names for the old and new row images visible to
RETURNING. The defaults are old and new.
Trait Implementations§
Source§impl Clone for InsertStmt
impl Clone for InsertStmt
Source§fn clone(&self) -> InsertStmt
fn clone(&self) -> InsertStmt
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 InsertStmt
impl Debug for InsertStmt
Source§impl<'de> Deserialize<'de> for InsertStmt
impl<'de> Deserialize<'de> for InsertStmt
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for InsertStmt
impl RefUnwindSafe for InsertStmt
impl Send for InsertStmt
impl Sync for InsertStmt
impl Unpin for InsertStmt
impl UnsafeUnpin for InsertStmt
impl UnwindSafe for InsertStmt
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more