pub struct Insert<'q, DB, T, DT>{
pub val: Vec<DT>,
pub fields: TableFields,
/* private fields */
}
Fields§
§val: Vec<DT>
§fields: TableFields
Implementations§
Source§impl<'q, DB, T, DT> Insert<'q, DB, T, DT>
impl<'q, DB, T, DT> Insert<'q, DB, T, DT>
pub fn new(val: DT) -> Self
pub fn new_vec(val: Vec<DT>) -> Self
pub fn model<'t: 'q, MI>(val: &'t MI) -> Selfwhere
MI: ModelInsertData<'q, DB, DT>,
pub fn model_vec<'t: 'q, MI>(val: &'t Vec<MI>) -> Selfwhere
MI: ModelInsertData<'q, DB, DT>,
pub fn sql_param(&self) -> Vec<String>
pub fn sql_values(&self) -> Vec<String>
pub fn bind_values<'t>( &'t self, res: Query<'t, DB, <DB as HasArguments<'t>>::Arguments>, ) -> Query<'t, DB, <DB as HasArguments<'t>>::Arguments>
pub async fn execute_return<'c, E>(
self,
executor: E,
filed: &str,
) -> Result<<DB as Database>::Row, Error>where
for<'n> <DB as HasArguments<'n>>::Arguments: Arguments<'n> + IntoArguments<'n, DB>,
E: Executor<'c, Database = DB>,
pub async fn execute<'c, E>(
self,
executor: E,
) -> Result<<DB as Database>::QueryResult, Error>where
for<'n> <DB as HasArguments<'n>>::Arguments: Arguments<'n> + IntoArguments<'n, DB>,
E: Executor<'c, Database = DB>,
pub async fn execute_update<'c, 't, CT, IT, E>(
self,
update: &Update<'t, DB, IT, CT>,
executor: E,
) -> Result<<DB as Database>::QueryResult, Error>where
IT: ModelUpdateData<'t, DB, CT>,
CT: UpdateData<'t, DB>,
for<'n> <DB as HasArguments<'n>>::Arguments: Arguments<'n> + IntoArguments<'n, DB>,
E: Executor<'c, Database = DB>,
Auto Trait Implementations§
impl<'q, DB, T, DT> Freeze for Insert<'q, DB, T, DT>
impl<'q, DB, T, DT> RefUnwindSafe for Insert<'q, DB, T, DT>
impl<'q, DB, T, DT> Send for Insert<'q, DB, T, DT>
impl<'q, DB, T, DT> Sync for Insert<'q, DB, T, DT>
impl<'q, DB, T, DT> Unpin for Insert<'q, DB, T, DT>
impl<'q, DB, T, DT> UnwindSafe for Insert<'q, DB, T, DT>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more