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
Abstract WHEN command of the MERGE statement.
-
Field Summary
FieldsFields 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 -
Method Summary
Modifier and TypeMethodDescription(package private) abstract void
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
Evaluates trigger mask (UPDATE, INSERT, DELETE).getSQL
(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 Details
-
andCondition
Expression andConditionAND condition of the command.
-
-
Constructor Details
-
When
When()
-
-
Method Details
-
setAndCondition
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
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
Find and collect all DbObjects, this When object depends on.- Parameters:
visitor
- the expression visitor
-
getSQL
Description copied from interface:HasSQL
Appends the SQL statement of this object to the specified builder.
-