Class WhenClause
java.lang.Object
dev.frostlake.executor.expressions.WhenClause
-
Constructor Summary
ConstructorsConstructorDescriptionWhenClause(Expression condition, Expression result) WhenClause(Expression condition, Expression result, boolean operandMatch) A WHEN of either CASE form. -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether this WHEN belongs to a simple CASE (CASE x WHEN v THEN r), whose condition is the operand's equality to the value.
-
Constructor Details
-
WhenClause
-
WhenClause
A WHEN of either CASE form.- Parameters:
condition- the condition, for a simple CASE the operand's equality to the WHEN valueresult- the THEN resultoperandMatch- whether the condition matches a simple CASE's operand against its WHEN value
-
-
Method Details
-
getCondition
-
getResult
-
isOperandMatch
public boolean isOperandMatch()Whether this WHEN belongs to a simple CASE (CASE x WHEN v THEN r), whose condition is the operand's equality to the value. The planner matches such a value as it matches a DECODE search, which it does not do for a searched CASE's condition: live settlesCASE n WHEN 7 THEN …as never taken over a column holding a NULL, and leavesCASE WHEN n = 7 THEN …open.- Returns:
- true for a simple CASE's WHEN
-