com.akiban.sql.parser
Class CursorNode
java.lang.Object
com.akiban.sql.parser.QueryTreeNode
com.akiban.sql.parser.StatementNode
com.akiban.sql.parser.DMLStatementNode
com.akiban.sql.parser.CursorNode
- All Implemented Interfaces:
- Visitable
public class CursorNode
- extends DMLStatementNode
A CursorNode represents a result set that can be returned to a client.
A cursor can be a named cursor created by the DECLARE CURSOR statement,
or it can be an unnamed cursor associated with a SELECT statement (more
precisely, a table expression that returns rows to the client). In the
latter case, the cursor does not have a name.
| 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, isInstanceOf, makeTableName, makeTableName, nodeHeader, printLabel, setBeginOffset, setDebugOutput, setEndOffset, setNodeType, setParserContext, setUserData, stackPrint, treePrint, treePrint, treePrint |
CursorNode
public CursorNode()
init
public void init(Object statementType,
Object resultSet,
Object name,
Object orderByList,
Object offset,
Object fetchFirst,
Object updateMode,
Object updatableColumns)
- Initializer for a CursorNode
- Overrides:
init in class QueryTreeNode
- Parameters:
statementType - Type of statement (SELECT, UPDATE, INSERT)resultSet - A ResultSetNode specifying the result set for
the cursorname - The name of the cursor, null if no nameorderByList - The order by list for the cursor, null if no
order by listoffset - The value of a if presentfetchFirst - The value of a if presentupdateMode - The user-specified update mode for the cursor,
for example, CursorNode.READ_ONLYupdatableColumns - The list of updatable columns specified by
the user in the FOR UPDATE clause, null if no
updatable columns specified. May only be
provided if the updateMode parameter is
CursorNode.UPDATE.
copyFrom
public void copyFrom(QueryTreeNode node)
throws StandardException
- Fill this node with a deep copy of the given node.
- Overrides:
copyFrom in class DMLStatementNode
- Throws:
StandardException
setScanIsolationLevel
public void setScanIsolationLevel(IsolationLevel isolationLevel)
toString
public String toString()
- Convert this object to a String. See comments in QueryTreeNode.java
for how this should be done for tree printing.
- Overrides:
toString in class StatementNode
- Returns:
- This object as a String
statementToString
public String statementToString()
- Specified by:
statementToString in class StatementNode
printSubNodes
public void printSubNodes(int depth)
- Prints the sub-nodes of this object. See QueryTreeNode.java for
how tree printing is supposed to work.
- Overrides:
printSubNodes in class DMLStatementNode
- Parameters:
depth - The depth of this node in the tree
getName
public String getName()
getOrderByList
public OrderByList getOrderByList()
getOffsetClause
public ValueNode getOffsetClause()
getFetchFirstClause
public ValueNode getFetchFirstClause()
getUpdateMode
public CursorNode.UpdateMode getUpdateMode()
getScanIsolationLevel
public IsolationLevel getScanIsolationLevel()
getUpdatableColumns
public List<String> getUpdatableColumns()
- Return collection of names from the FOR UPDATE OF List
- Returns:
- List of names from the FOR UPDATE OF list.
Copyright © 2013 Akiban Technologies, Inc. All rights reserved.