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§impl Debug for InsertBuilder
impl Debug for InsertBuilder
Auto Trait Implementations§
impl Freeze for InsertBuilder
impl RefUnwindSafe for InsertBuilder
impl Send for InsertBuilder
impl Sync for InsertBuilder
impl Unpin for InsertBuilder
impl UnsafeUnpin 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