net.sf.saffron.sql
Class SqlSelect

java.lang.Object
  |
  +--net.sf.saffron.sql.SqlNode
        |
        +--net.sf.saffron.sql.SqlCall
              |
              +--net.sf.saffron.sql.SqlSelect

public class SqlSelect
extends SqlCall

A SqlSelect is a node of a parse tree which represents a select statement. It warrants its own node type just because we have a lot of methods to put somewhere.


Nested Class Summary
 
Nested classes inherited from class net.sf.saffron.sql.SqlNode
SqlNode.DatabaseMetaDataInvocationHandler
 
Field Summary
static int DISTINCT_OPERAND
           
static int FROM_OPERAND
           
static int GROUP_OPERAND
           
static int HAVING_OPERAND
           
static int OPERAND_COUNT
           
static int ORDER_OPERAND
           
static int SELECT_OPERAND
           
static int WHERE_OPERAND
           
 
Fields inherited from class net.sf.saffron.sql.SqlCall
operands, operator
 
Constructor Summary
(package private) SqlSelect(SqlSelectOperator operator, SqlNode[] operands)
           
 
Method Summary
 void addFrom(SqlIdentifier tableId)
           
 void addWhere(SqlNode condition)
           
 SqlNode getFrom()
           
 SqlNodeList getGroup()
           
 SqlNode getHaving()
           
 SqlNodeList getOrderList()
           
 SqlNodeList getSelectList()
           
 SqlNode getWhere()
           
 boolean isDistinct()
           
 void unparse(SqlWriter writer, int leftPrec, int rightPrec)
          Writes a SQL representation of this node to a writer.
 
Methods inherited from class net.sf.saffron.sql.SqlCall
addOperand, clone, getKind, getOperands, isA, setOperand
 
Methods inherited from class net.sf.saffron.sql.SqlNode
cloneArray, toString, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DISTINCT_OPERAND

public static final int DISTINCT_OPERAND
See Also:
Constant Field Values

SELECT_OPERAND

public static final int SELECT_OPERAND
See Also:
Constant Field Values

FROM_OPERAND

public static final int FROM_OPERAND
See Also:
Constant Field Values

WHERE_OPERAND

public static final int WHERE_OPERAND
See Also:
Constant Field Values

GROUP_OPERAND

public static final int GROUP_OPERAND
See Also:
Constant Field Values

HAVING_OPERAND

public static final int HAVING_OPERAND
See Also:
Constant Field Values

ORDER_OPERAND

public static final int ORDER_OPERAND
See Also:
Constant Field Values

OPERAND_COUNT

public static final int OPERAND_COUNT
See Also:
Constant Field Values
Constructor Detail

SqlSelect

SqlSelect(SqlSelectOperator operator,
          SqlNode[] operands)
Method Detail

isDistinct

public final boolean isDistinct()

getFrom

public final SqlNode getFrom()

getGroup

public final SqlNodeList getGroup()

getHaving

public final SqlNode getHaving()

getSelectList

public final SqlNodeList getSelectList()

getWhere

public final SqlNode getWhere()

getOrderList

public final SqlNodeList getOrderList()

addFrom

public void addFrom(SqlIdentifier tableId)

addWhere

public void addWhere(SqlNode condition)

unparse

public void unparse(SqlWriter writer,
                    int leftPrec,
                    int rightPrec)
Description copied from class: SqlNode
Writes a SQL representation of this node to a writer.

Overrides:
unparse in class SqlCall

SourceForge.net_Logo