com.akiban.sql.parser
Class OrderByList
java.lang.Object
com.akiban.sql.parser.QueryTreeNode
com.akiban.sql.parser.QueryTreeNodeList<N>
com.akiban.sql.parser.OrderedColumnList<OrderByColumn>
com.akiban.sql.parser.OrderByList
- All Implemented Interfaces:
- Visitable, Iterable<OrderByColumn>
public class OrderByList
- extends OrderedColumnList<OrderByColumn>
An OrderByList is an ordered list of columns in the ORDER BY clause.
That is, the order of columns in this list is significant - the
first column in the list is the most significant in the ordering,
and the last column in the list is the least significant.
| Methods inherited from class com.akiban.sql.parser.QueryTreeNodeList |
add, add, addAll, clear, copyFrom, destructiveAddAll, get, getList, indexOf, isEmpty, iterator, printSubNodes, remove, remove, set, size |
| Methods inherited from class com.akiban.sql.parser.QueryTreeNode |
accept, convertDefaultNode, debugFlush, debugPrint, formatNodeString, getBeginOffset, getDebugOutput, getEndOffset, getNodeFactory, getNodeType, getNullNode, getParserContext, getStatementType, getUserData, init, init, init, init, init, init, init, init, init, init, init, init, init, init, isInstanceOf, makeTableName, makeTableName, nodeHeader, printLabel, setBeginOffset, setDebugOutput, setEndOffset, setNodeType, setParserContext, setUserData, stackPrint, treePrint, treePrint, treePrint |
OrderByList
public OrderByList()
addOrderByColumn
public void addOrderByColumn(OrderByColumn column)
- Add a column to the list
- Parameters:
column - The column to add to the list
getOrderByColumn
public OrderByColumn getOrderByColumn(int position)
- Get a column from the list
- Parameters:
position - The column to get from the list
toString
public String toString()
- Description copied from class:
QueryTreeNode
- Format this node as a string
Each sub-class of QueryTreeNode should implement its own toString()
method. In each case, toString() should format the class members
that are not sub-types of QueryTreeNode (printSubNodes() takes care
of following the references to sub-nodes, and toString() takes care
of all members that are not sub-nodes). Newlines should be used
liberally - one good way to do this is to have a newline at the
end of each formatted member. It's also a good idea to put the
name of each member in front of the formatted value. For example,
the code might look like:
"memberName: " + memberName + "\n" + ...
List members containing subclasses of QueryTreeNode should subclass
QueryTreeNodeList. Such subclasses form a special case: These classes
should not implement printSubNodes, since there is generic handling in
QueryTreeNodeList. They should only implement toString if they
contain additional members.
- Overrides:
toString in class QueryTreeNode
- Returns:
- This node formatted as a String
Copyright © 2013 Akiban Technologies, Inc. All rights reserved.