pub struct InsertBuilder {
pub q: Insert,
}Expand description
See Insert for field descriptions. Call build() to get a finished query
object.
Fields§
§q: InsertImplementations§
Source§impl InsertBuilder
impl InsertBuilder
pub fn on_conflict_do_update(self, f: &[&Field], v: Vec<(Field, Expr)>) -> Self
pub fn on_conflict_do_nothing(self) -> Self
pub fn return_(self, v: Expr) -> Self
pub fn return_named(self, name: impl ToString, v: Expr) -> Self
pub fn return_field(self, f: &Field) -> Self
pub fn return_fields(self, f: &[&Field]) -> Self
pub fn returns_from_iter(self, f: impl Iterator<Item = Returning>) -> Self
Sourcepub fn build_migration(self) -> Insert
pub fn build_migration(self) -> Insert
Produce a migration for use in version pre/post-migration.
Sourcepub fn build_query(self, name: impl ToString, res_count: QueryResCount) -> Query
pub fn build_query(self, name: impl ToString, res_count: QueryResCount) -> Query
Sourcepub fn build_query_named_res(
self,
name: impl ToString,
res_count: QueryResCount,
res_name: impl ToString,
) -> Query
pub fn build_query_named_res( self, name: impl ToString, res_count: QueryResCount, res_name: impl ToString, ) -> Query
Same as build_query, but specify a name for the result structure. Only valid
if result is a record (not a single 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 !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