#[non_exhaustive]pub struct MergeIntoOp {
pub on: Expr,
pub clauses: Vec<MergeIntoClause>,
/* private fields */
}Expand description
Describes a MERGE INTO operation’s parameters.
Self::target_qualifier is the SQL-visible relation name used by
expressions. The target’s catalog/provider identity remains in
DmlStatement::table_name.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.on: ExprThe join condition from ON <expr>.
clauses: Vec<MergeIntoClause>The WHEN clauses, in the order they appeared in the SQL.
Implementations§
Source§impl MergeIntoOp
impl MergeIntoOp
Sourcepub fn new(
target_qualifier: impl Into<TableReference>,
on: Expr,
clauses: Vec<MergeIntoClause>,
) -> Self
pub fn new( target_qualifier: impl Into<TableReference>, on: Expr, clauses: Vec<MergeIntoClause>, ) -> Self
Create a MERGE operation.
Sourcepub fn target_qualifier(&self) -> &TableReference
pub fn target_qualifier(&self) -> &TableReference
Return the target relation name visible to MERGE expressions.
Sourcepub fn expression_schema(
&self,
target_schema: &Schema,
source_schema: &DFSchema,
) -> Result<DFSchema>
pub fn expression_schema( &self, target_schema: &Schema, source_schema: &DFSchema, ) -> Result<DFSchema>
Build the schema used to resolve expressions owned by this operation.
Target fields precede source fields. The visible target qualifier must not also identify a source relation in the outer MERGE scope.
Sourcepub fn expression_schema_for(
target_qualifier: &TableReference,
target_schema: &Schema,
source_schema: &DFSchema,
) -> Result<DFSchema>
pub fn expression_schema_for( target_qualifier: &TableReference, target_schema: &Schema, source_schema: &DFSchema, ) -> Result<DFSchema>
Build a MERGE expression schema before constructing the operation.
Sourcepub fn exprs(&self) -> Vec<&Expr>
pub fn exprs(&self) -> Vec<&Expr>
Top-level Exprs in stable order: on, then per-clause predicate
(if any) and action value expressions.
Sourcepub fn with_new_exprs(&self, exprs: Vec<Expr>) -> Result<Self>
pub fn with_new_exprs(&self, exprs: Vec<Expr>) -> Result<Self>
Rebuild this MergeIntoOp from a flat vector of new expressions, in
the same order produced by Self::exprs. The clause kinds, action
kinds, column lists, and presence/absence of each predicate are
preserved from self.
Trait Implementations§
Source§impl Clone for MergeIntoOp
impl Clone for MergeIntoOp
Source§impl Debug for MergeIntoOp
impl Debug for MergeIntoOp
Source§impl Display for MergeIntoOp
impl Display for MergeIntoOp
impl Eq for MergeIntoOp
Source§impl Hash for MergeIntoOp
impl Hash for MergeIntoOp
Source§impl PartialEq for MergeIntoOp
impl PartialEq for MergeIntoOp
Source§impl PartialOrd for MergeIntoOp
impl PartialOrd for MergeIntoOp
impl StructuralPartialEq for MergeIntoOp
Auto Trait Implementations§
impl !RefUnwindSafe for MergeIntoOp
impl !UnwindSafe for MergeIntoOp
impl Forget for MergeIntoOp
impl Freeze for MergeIntoOp
impl Move for MergeIntoOp
impl Send for MergeIntoOp
impl Sync for MergeIntoOp
impl Unpin for MergeIntoOp
impl UnsafeUnpin for MergeIntoOp
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> ⓘ
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> ⓘ
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