pub struct InsertBuilder { /* private fields */ }Implementations§
Source§impl InsertBuilder
impl InsertBuilder
pub fn new(table: &str) -> Self
pub fn set<T>(self, col: &Column<T>, val: impl Into<Value>) -> Self
pub fn set_null<T>(self, col: &Column<T>) -> Self
pub fn or_replace(self) -> Self
pub fn or_ignore(self) -> Self
Sourcepub fn conflict_columns(self, cols: &[&str]) -> Self
pub fn conflict_columns(self, cols: &[&str]) -> Self
Columns that form the ON CONFLICT (...) target for Postgres.
Ignored for SQLite (INSERT OR REPLACE / INSERT OR IGNORE).
If unset, the first inserted column is used as the conflict target.
pub fn to_sql_for(&self, dialect: Dialect) -> (String, Vec<Value>)
pub fn to_sql(&self) -> (String, Vec<Value>)
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