pub struct MergeBuilder { /* private fields */ }Expand description
Builder for MERGE (UPSERT) operations.
Implementations§
Source§impl MergeBuilder
impl MergeBuilder
pub fn new( table: Table, source: BoxStream<'static, Result<RecordBatch>>, on_condition: Expr, ) -> Self
Sourcepub fn when_matched(self, condition: Option<Expr>, action: MergeAction) -> Self
pub fn when_matched(self, condition: Option<Expr>, action: MergeAction) -> Self
Adds a clause to be applied when the ON condition matches.
Sourcepub fn when_not_matched(
self,
condition: Option<Expr>,
action: MergeAction,
) -> Self
pub fn when_not_matched( self, condition: Option<Expr>, action: MergeAction, ) -> Self
Adds a clause to be applied when the ON condition does NOT match.
Sourcepub async fn execute(self) -> Result<Transaction>
pub async fn execute(self) -> Result<Transaction>
Executes the merge operation as a Copy-on-Write process.
Auto Trait Implementations§
impl Freeze for MergeBuilder
impl !RefUnwindSafe for MergeBuilder
impl Send for MergeBuilder
impl !Sync for MergeBuilder
impl Unpin for MergeBuilder
impl !UnwindSafe for MergeBuilder
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> 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