pub struct InsertBuilder { /* private fields */ }Expand description
Builder for INSERT statements.
Implementations§
Source§impl InsertBuilder
impl InsertBuilder
Sourcepub fn into_table(self, qi: &QualifiedIdentifier) -> Self
pub fn into_table(self, qi: &QualifiedIdentifier) -> Self
Set the target table.
Sourcepub fn values_raw(self, vals: Vec<SqlFragment>) -> Self
pub fn values_raw(self, vals: Vec<SqlFragment>) -> Self
Add a row of raw SQL values.
Sourcepub fn on_conflict_do_nothing(self) -> Self
pub fn on_conflict_do_nothing(self) -> Self
Set ON CONFLICT DO NOTHING.
Sourcepub fn on_conflict_do_update(
self,
conflict_columns: Vec<String>,
set: Vec<(String, SqlFragment)>,
) -> Self
pub fn on_conflict_do_update( self, conflict_columns: Vec<String>, set: Vec<(String, SqlFragment)>, ) -> Self
Set ON CONFLICT DO UPDATE.
Sourcepub fn returning_all(self) -> Self
pub fn returning_all(self) -> Self
Add RETURNING * clause.
Sourcepub fn build(self) -> SqlFragment
pub fn build(self) -> SqlFragment
Build the INSERT statement.
Trait Implementations§
Source§impl Clone for InsertBuilder
impl Clone for InsertBuilder
Source§fn clone(&self) -> InsertBuilder
fn clone(&self) -> InsertBuilder
Returns a duplicate of the value. Read more
1.0.0 · 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 InsertBuilder
impl Debug for InsertBuilder
Source§impl Default for InsertBuilder
impl Default for InsertBuilder
Source§fn default() -> InsertBuilder
fn default() -> InsertBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for InsertBuilder
impl RefUnwindSafe for InsertBuilder
impl Send for InsertBuilder
impl Sync for InsertBuilder
impl Unpin for InsertBuilder
impl UnwindSafe for InsertBuilder
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