pub struct CreateOperation<E: QueryEngine, M: Model> { /* private fields */ }Expand description
Implementations§
Source§impl<E: QueryEngine, M: Model> CreateOperation<E, M>
impl<E: QueryEngine, M: Model> CreateOperation<E, M>
Sourcepub fn set(
self,
column: impl Into<String>,
value: impl Into<FilterValue>,
) -> Self
pub fn set( self, column: impl Into<String>, value: impl Into<FilterValue>, ) -> Self
Set a column value.
Sourcepub fn set_many(
self,
values: impl IntoIterator<Item = (impl Into<String>, impl Into<FilterValue>)>,
) -> Self
pub fn set_many( self, values: impl IntoIterator<Item = (impl Into<String>, impl Into<FilterValue>)>, ) -> Self
Set multiple column values from an iterator.
Sourcepub fn build_sql(&self) -> (String, Vec<FilterValue>)
pub fn build_sql(&self) -> (String, Vec<FilterValue>)
Build the SQL query.
Sourcepub async fn exec(self) -> QueryResult<M>where
M: Send + 'static,
pub async fn exec(self) -> QueryResult<M>where
M: Send + 'static,
Execute the create operation and return the created record.
Auto Trait Implementations§
impl<E, M> Freeze for CreateOperation<E, M>where
E: Freeze,
impl<E, M> RefUnwindSafe for CreateOperation<E, M>where
E: RefUnwindSafe,
M: RefUnwindSafe,
impl<E, M> Send for CreateOperation<E, M>
impl<E, M> Sync for CreateOperation<E, M>
impl<E, M> Unpin for CreateOperation<E, M>
impl<E, M> UnwindSafe for CreateOperation<E, M>where
E: UnwindSafe,
M: UnwindSafe,
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