pub struct Insert<'a> { /* private fields */ }
Expand description
A builder for an INSERT
statement.
Implementations§
Source§impl<'a> Insert<'a>
impl<'a> Insert<'a>
Sourcepub fn single_into<T>(table: T) -> SingleRowInsert<'a>
pub fn single_into<T>(table: T) -> SingleRowInsert<'a>
Creates a new single row INSERT
statement for the given table.
let query = Insert::single_into("users");
let (sql, _) = Sqlite::build(query);
assert_eq!("INSERT INTO `users` DEFAULT VALUES", sql);
Sourcepub fn multi_into<T, K, I>(table: T, columns: I) -> MultiRowInsert<'a>
pub fn multi_into<T, K, I>(table: T, columns: I) -> MultiRowInsert<'a>
Creates a new multi row INSERT
statement for the given table.
Sourcepub fn on_conflict(self, on_conflict: OnConflict) -> Self
pub fn on_conflict(self, on_conflict: OnConflict) -> Self
Sets the conflict resolution strategy.
Trait Implementations§
Source§impl<'a> From<MultiRowInsert<'a>> for Insert<'a>
impl<'a> From<MultiRowInsert<'a>> for Insert<'a>
Source§fn from(insert: MultiRowInsert<'a>) -> Self
fn from(insert: MultiRowInsert<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<SingleRowInsert<'a>> for Insert<'a>
impl<'a> From<SingleRowInsert<'a>> for Insert<'a>
Source§fn from(insert: SingleRowInsert<'a>) -> Self
fn from(insert: SingleRowInsert<'a>) -> Self
Converts to this type from the input type.
impl<'a> StructuralPartialEq for Insert<'a>
Auto Trait Implementations§
impl<'a> Freeze for Insert<'a>
impl<'a> RefUnwindSafe for Insert<'a>
impl<'a> Send for Insert<'a>
impl<'a> Sync for Insert<'a>
impl<'a> Unpin for Insert<'a>
impl<'a> UnwindSafe for Insert<'a>
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