pub struct CreateRecord {
pub insert_query: DbQuery,
pub select_defaults: Option<CreateRecordDefaultsQuery>,
pub last_insert_id_field: Option<ScalarField>,
pub merge_values: Vec<(SelectedField, PrismaValue)>,
}Expand description
An insertion operation for a record in the database.
Fields§
§insert_query: DbQueryThe insert query to run in order to create the record.
select_defaults: Option<CreateRecordDefaultsQuery>The query to run prior to the insert in order to create default column values. This is used in some cases where the database does not support returning default values.
last_insert_id_field: Option<ScalarField>The field in the model of the record that corresponds to the last inserted ID, if required by the database.
merge_values: Vec<(SelectedField, PrismaValue)>The values to merge into the resulting record after insertion. These are inferred from the input arguments.
Auto Trait Implementations§
impl Freeze for CreateRecord
impl !RefUnwindSafe for CreateRecord
impl Send for CreateRecord
impl Sync for CreateRecord
impl Unpin for CreateRecord
impl UnsafeUnpin for CreateRecord
impl !UnwindSafe for CreateRecord
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