#[non_exhaustive]pub struct UpsertOptions {
pub ignore_nulls: bool,
pub merge_maps: bool,
pub merge_lists: bool,
}Expand description
Options for performing automatic upserts.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.ignore_nulls: boolIgnore null values of fields when updating. If this is false (the default),
missing values will be set to null.
merge_maps: boolMerge maps when updating. If this is false (the default),
maps (like metadata) will be overwritten.
merge_lists: boolMerge lists when updating. If this is false (the default),
lists will be overwritten.
Implementations§
Source§impl UpsertOptions
impl UpsertOptions
Sourcepub fn ignore_nulls(self, ignore_nulls: bool) -> Self
pub fn ignore_nulls(self, ignore_nulls: bool) -> Self
Ignore null values of fields when updating. If this is false (the default),
missing values will be set to null.
Sourcepub fn merge_metadata(self, merge_metadata: bool) -> Self
pub fn merge_metadata(self, merge_metadata: bool) -> Self
Merge metadata maps when updating. If this is false (the default),
metadata will be overwritten.
Sourcepub fn merge_lists(self, merge_lists: bool) -> Self
pub fn merge_lists(self, merge_lists: bool) -> Self
Merge lists when updating. If this is false (the default),
lists will be overwritten.
Trait Implementations§
Source§impl Clone for UpsertOptions
impl Clone for UpsertOptions
Source§fn clone(&self) -> UpsertOptions
fn clone(&self) -> UpsertOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UpsertOptions
impl Debug for UpsertOptions
Source§impl Default for UpsertOptions
impl Default for UpsertOptions
Source§fn default() -> UpsertOptions
fn default() -> UpsertOptions
Returns the “default value” for a type. Read more
impl Copy for UpsertOptions
Auto Trait Implementations§
impl Freeze for UpsertOptions
impl RefUnwindSafe for UpsertOptions
impl Send for UpsertOptions
impl Sync for UpsertOptions
impl Unpin for UpsertOptions
impl UnwindSafe for UpsertOptions
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