pub struct MergeOptions { /* private fields */ }Expand description
MERGE 的可选分支配置。
默认值表示现有的「命中更新 + 未命中插入」行为,与 QueryBuilder::merge
完全一致;使用带条件的命中分支或 NOT MATCHED BY SOURCE 时改用
QueryBuilder::merge_with_options。
Implementations§
Source§impl MergeOptions
impl MergeOptions
Sourcepub fn matched_condition(self, condition: Condition) -> Self
pub fn matched_condition(self, condition: Condition) -> Self
为 WHEN MATCHED 分支追加 AND <condition>。
Sourcepub fn not_matched_by_source(self, action: MergeNotMatchedBySource) -> Self
pub fn not_matched_by_source(self, action: MergeNotMatchedBySource) -> Self
追加 WHEN NOT MATCHED BY SOURCE 分支(PostgreSQL 17+)。
Trait Implementations§
Source§impl Clone for MergeOptions
impl Clone for MergeOptions
Source§impl Debug for MergeOptions
impl Debug for MergeOptions
Auto Trait Implementations§
impl Forget for MergeOptions
impl Freeze for MergeOptions
impl Move for MergeOptions
impl RefUnwindSafe for MergeOptions
impl Send for MergeOptions
impl Sync for MergeOptions
impl Unpin for MergeOptions
impl UnsafeUnpin for MergeOptions
impl UnwindSafe for MergeOptions
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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