pub struct Insert { /* private fields */ }Expand description
An INSERT statement.
Implementations§
Source§impl Insert
impl Insert
Sourcepub fn into_table(self, table: impl Into<TableRef>) -> Self
pub fn into_table(self, table: impl Into<TableRef>) -> Self
Sets INSERT INTO table.
Sourcepub fn columns<C: IntoIden>(self, columns: impl IntoIterator<Item = C>) -> Self
pub fn columns<C: IntoIden>(self, columns: impl IntoIterator<Item = C>) -> Self
Sets the column list.
Sourcepub fn values<V: Into<Expr>>(self, row: impl IntoIterator<Item = V>) -> Self
pub fn values<V: Into<Expr>>(self, row: impl IntoIterator<Item = V>) -> Self
Adds a row of values, one per column.
Sourcepub fn default_values(self) -> Self
pub fn default_values(self) -> Self
Sets INSERT INTO table DEFAULT VALUES.
Sourcepub fn select_from(self, select: Select) -> Self
pub fn select_from(self, select: Select) -> Self
Sets INSERT INTO table (...) SELECT ....
Sourcepub fn on_conflict(self, on_conflict: OnConflict) -> Self
pub fn on_conflict(self, on_conflict: OnConflict) -> Self
Sets the ON CONFLICT clause.
Sourcepub fn returning_all(self) -> Self
pub fn returning_all(self) -> Self
Sets RETURNING *.
Trait Implementations§
impl StructuralPartialEq for Insert
Auto Trait Implementations§
impl Freeze for Insert
impl RefUnwindSafe for Insert
impl Send for Insert
impl Sync for Insert
impl Unpin for Insert
impl UnsafeUnpin for Insert
impl UnwindSafe for Insert
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