pub struct InsertStmt {
pub table: String,
pub target_relation_bound: bool,
pub target_qualifier: String,
pub include_descendants: bool,
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_relation_bound: boolWhether table is a stored catalog identity rather than a name to resolve in the executing session.
target_qualifier: StringSQL-visible target relation name: explicit alias, otherwise the local relation name.
include_descendants: bool§columns: Vec<String>§with: Vec<CTE>Common table expressions defined with WITH [RECURSIVE] ....
rows: Vec<Vec<ValueExpr>>Inline VALUES (...) (...) rows. DEFAULT VALUES is represented by one empty row; the vector itself is empty only for INSERT ... SELECT, whose query is in select_source.
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
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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>,
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
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> ⓘ
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> ⓘ
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