org.eigenbase.sql.fun
Class SqlCase
java.lang.Object
org.eigenbase.sql.SqlNode
org.eigenbase.sql.SqlCall
org.eigenbase.sql.fun.SqlCase
- All Implemented Interfaces:
- Cloneable
public class SqlCase
- extends SqlCall
A SqlCase
is a node of a parse tree which represents a case
statement. It warrants its own node type just because we have a lot of
methods to put somewhere.
- Since:
- Mar 14, 2004
- Version:
- $Id: //open/dev/farrago/src/org/eigenbase/sql/fun/SqlCase.java#7 $
- Author:
- wael
Methods inherited from class org.eigenbase.sql.SqlCall |
accept, clone, equalsDeep, findValidOptions, getCallSignature, getFunctionQuantifier, getKind, getMonotonicity, getOperands, getOperator, isA, isCountStar, isExpanded, isName, setOperand, setOperator, unparse, validate |
WHEN_OPERANDS
public static final int WHEN_OPERANDS
- WHEN_OPERANDS = 0
- See Also:
- Constant Field Values
THEN_OPERANDS
public static final int THEN_OPERANDS
- THEN_OPERANDS = 1
- See Also:
- Constant Field Values
ELSE_OPERAND
public static final int ELSE_OPERAND
- ELSE_OPERAND = 2
- See Also:
- Constant Field Values
SqlCase
SqlCase(SqlCaseOperator operator,
SqlNode[] operands,
SqlParserPos pos)
- Creates a SqlCase expression.
The operands are an array of SqlNodes where
- operands[0] is a SqlNodeList of all WHEN expressions
- operands[1] is a SqlNodeList of all THEN expressions
- operands[2] is a SqlNode representing the implicit or explicit ELSE
expression
See WHEN_OPERANDS
, THEN_OPERANDS
, ELSE_OPERAND
.
getWhenOperands
public SqlNodeList getWhenOperands()
getThenOperands
public SqlNodeList getThenOperands()
getElseOperand
public SqlNode getElseOperand()