org.eigenbase.sql.fun
Class SqlCase

java.lang.Object
  extended by org.eigenbase.sql.SqlNode
      extended by org.eigenbase.sql.SqlCall
          extended by 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

Field Summary
static int ELSE_OPERAND
          ELSE_OPERAND = 2
static int THEN_OPERANDS
          THEN_OPERANDS = 1
static int WHEN_OPERANDS
          WHEN_OPERANDS = 0
 
Fields inherited from class org.eigenbase.sql.SqlCall
operands
 
Fields inherited from class org.eigenbase.sql.SqlNode
emptyArray
 
Constructor Summary
SqlCase(SqlCaseOperator operator, SqlNode[] operands, SqlParserPos pos)
          Creates a SqlCase expression.
 
Method Summary
 SqlNode getElseOperand()
           
 SqlNodeList getThenOperands()
           
 SqlNodeList getWhenOperands()
           
 
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
 
Methods inherited from class org.eigenbase.sql.SqlNode
clone, cloneArray, equalDeep, getParserPosition, toSqlString, toSqlString, toString, validateExpr
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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
Constructor Detail

SqlCase

SqlCase(SqlCaseOperator operator,
        SqlNode[] operands,
        SqlParserPos pos)
Creates a SqlCase expression.

The operands are an array of SqlNodes where

See WHEN_OPERANDS, THEN_OPERANDS, ELSE_OPERAND.

Method Detail

getWhenOperands

public SqlNodeList getWhenOperands()

getThenOperands

public SqlNodeList getThenOperands()

getElseOperand

public SqlNode getElseOperand()