EMPTY_ARRAY, pos| Constructor and Description |
|---|
SqlCase(SqlParserPos pos,
SqlNode value,
SqlNodeList whenList,
SqlNodeList thenList,
SqlNode elseExpr)
Creates a SqlCase expression.
|
| Modifier and Type | Method and Description |
|---|---|
static SqlCase |
createSwitched(SqlParserPos pos,
SqlNode value,
SqlNodeList whenList,
SqlNodeList thenList,
SqlNode elseClause)
Creates a call to the switched form of the case operator, viz:
CASE value |
SqlNode |
getElseOperand() |
SqlKind |
getKind()
Returns the type of node this is, or
SqlKind.OTHER if it's nothing special. |
List<SqlNode> |
getOperandList() |
SqlOperator |
getOperator() |
SqlNodeList |
getThenOperands() |
SqlNode |
getValueOperand() |
SqlNodeList |
getWhenOperands() |
void |
setOperand(int i,
SqlNode operand)
Changes the value of an operand.
|
accept, clone, equalsDeep, findValidOptions, getCallSignature, getFunctionQuantifier, getMonotonicity, isCountStar, isExpanded, operand, operandCount, unparse, validateclone, cloneArray, equalDeep, equalDeep, getParserPosition, isA, toSqlString, toSqlString, toString, validateExprpublic SqlCase(SqlParserPos pos, SqlNode value, SqlNodeList whenList, SqlNodeList thenList, SqlNode elseExpr)
pos - Parser positionvalue - The value (null for boolean case)whenList - List of all WHEN expressionsthenList - List of all THEN expressionselseExpr - The implicit or explicit ELSE expressionpublic static SqlCase createSwitched(SqlParserPos pos, SqlNode value, SqlNodeList whenList, SqlNodeList thenList, SqlNode elseClause)
CASE value
WHEN whenList[0] THEN thenList[0]
WHEN whenList[1] THEN thenList[1]
...
ELSE elseClause
ENDpublic SqlKind getKind()
SqlNodeSqlKind.OTHER if it's nothing special.getKind in class SqlNodeSqlKind value, never nullSqlNode.isA(java.util.Set<org.apache.calcite.sql.SqlKind>)public SqlOperator getOperator()
getOperator in class SqlCallpublic List<SqlNode> getOperandList()
getOperandList in class SqlCallpublic void setOperand(int i,
SqlNode operand)
SqlCallSqlValidator; use sparingly.setOperand in class SqlCalli - Operand indexoperand - Operand valuepublic SqlNode getValueOperand()
public SqlNodeList getWhenOperands()
public SqlNodeList getThenOperands()
public SqlNode getElseOperand()
Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.