Package org.h2.command.dml
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 java.lang.Object implements HasSQL
Abstract WHEN command of the MERGE statement.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) Expression
andCondition
AND condition of the command.-
Fields inherited from interface org.h2.util.HasSQL
ADD_PLAN_INFORMATION, DEFAULT_SQL_FLAGS, NO_CASTS, QUOTE_ONLY_WHEN_REQUIRED, REPLACE_LOBS_FOR_TRACE, TRACE_SQL_FLAGS
-
-
Constructor Summary
Constructors Constructor Description When()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) abstract void
checkRights()
Checks user's INSERT, UPDATE, DELETE permission in appropriate cases.(package private) void
collectDependencies(ExpressionVisitor visitor)
Find and collect all DbObjects, this When object depends on.(package private) abstract int
evaluateTriggerMasks()
Evaluates trigger mask (UPDATE, INSERT, DELETE).java.lang.StringBuilder
getSQL(java.lang.StringBuilder builder, int sqlFlags)
Appends the SQL statement of this object to the specified builder.(package private) abstract void
merge(SessionLocal session, ResultTarget deltaChangeCollector, DataChangeDeltaTable.ResultOption deltaChangeCollectionMode)
Merges rows.(package private) boolean
prepare(SessionLocal session)
Prepares WHEN command.void
setAndCondition(Expression andCondition)
Sets the specified AND condition.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.h2.util.HasSQL
getSQL, getTraceSQL
-
-
-
-
Field Detail
-
andCondition
Expression andCondition
AND condition of the command.
-
-
Method Detail
-
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 sessiondeltaChangeCollector
- target resultdeltaChangeCollectionMode
- 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 java.lang.StringBuilder getSQL(java.lang.StringBuilder builder, int sqlFlags)
Description copied from interface:HasSQL
Appends the SQL statement of this object to the specified builder.
-
-