Class MergeUsing.When

java.lang.Object
org.h2.command.dml.MergeUsing.When
All Implemented Interfaces:
HasSQL
Direct Known Subclasses:
MergeUsing.WhenMatchedThenDelete, MergeUsing.WhenMatchedThenUpdate, MergeUsing.WhenNotMatched
Enclosing class:
MergeUsing

public abstract class MergeUsing.When extends Object implements HasSQL
Abstract WHEN command of the MERGE statement.
  • Field Details

    • andCondition

      Expression andCondition
      AND condition of the command.
  • Constructor Details

    • When

      When()
  • Method Details

    • setAndCondition

      public void setAndCondition(Expression andCondition)
      Sets the specified AND condition.
      Parameters:
      andCondition - AND condition to set
    • merge

      abstract void merge(SessionLocal session, ResultTarget deltaChangeCollector, DataChangeDeltaTable.ResultOption deltaChangeCollectionMode)
      Merges rows.
      Parameters:
      session - the session
      deltaChangeCollector - target result
      deltaChangeCollectionMode - collection mode
    • prepare

      boolean prepare(SessionLocal session)
      Prepares WHEN command.
      Parameters:
      session - the session
      Returns:
      false if this clause may be removed
    • evaluateTriggerMasks

      abstract int evaluateTriggerMasks()
      Evaluates trigger mask (UPDATE, INSERT, DELETE).
      Returns:
      the trigger mask.
    • checkRights

      abstract void checkRights()
      Checks user's INSERT, UPDATE, DELETE permission in appropriate cases.
    • collectDependencies

      void collectDependencies(ExpressionVisitor visitor)
      Find and collect all DbObjects, this When object depends on.
      Parameters:
      visitor - the expression visitor
    • getSQL

      public StringBuilder getSQL(StringBuilder builder, int sqlFlags)
      Description copied from interface: HasSQL
      Appends the SQL statement of this object to the specified builder.
      Specified by:
      getSQL in interface HasSQL
      Parameters:
      builder - string builder
      sqlFlags - formatting flags
      Returns:
      the specified string builder