| java.lang.Object org.apache.derby.impl.sql.compile.QueryTreeNode org.apache.derby.impl.sql.compile.StatementNode org.apache.derby.impl.sql.compile.DMLStatementNode org.apache.derby.impl.sql.compile.CursorNode
CursorNode | public class CursorNode extends DMLStatementNode (Code) | | 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.
author: Jeff Lichtman |
Method Summary | |
int | activationKind() Returns the type of activation this class
generates. | public QueryTreeNode | bind() Bind this CursorNode. | public void | generate(ActivationClassBuilder acb, MethodBuilder mb) | public Object | getCursorInfo() Get information about this cursor. | protected ArrayList | getSessionSchemaTableNamesForCursor() | public String | getUpdateBaseTableName() | public String | getUpdateExposedTableName() | public int | getUpdateMode() | public String | getUpdateSchemaName() | public String | getXML() | public void | init(Object statementType, Object resultSet, Object name, Object orderByList, Object updateMode, Object updatableColumns) Initializer for a CursorNode
Parameters: statementType - Type of statement (SELECT, UPDATE, INSERT) Parameters: resultSet - A ResultSetNode specifying the result set forthe cursor Parameters: name - The name of the cursor, null if no name Parameters: orderByList - The order by list for the cursor, null if noorder by list Parameters: updateMode - The user-specified update mode for the cursor,for example, CursorNode.READ_ONLY Parameters: updatableColumns - The list of updatable columns specified bythe user in the FOR UPDATE clause, null if noupdatable columns specified. | public boolean | needsSavepoint() Returns whether or not this Statement requires a set/clear savepoint
around its execution. | public QueryTreeNode | optimize() Optimize a DML statement (which is the only type of statement that
should need optimizing, I think). | public void | printSubNodes(int depth) Prints the sub-nodes of this object. | public boolean | referencesSessionSchema() | public String | statementToString() | public String | toString() Convert this object to a String. |
READ_ONLY | final public static int READ_ONLY(Code) | | |
UNSPECIFIED | final public static int UNSPECIFIED(Code) | | |
UPDATE | final public static int UPDATE(Code) | | |
activationKind | int activationKind()(Code) | | Returns the type of activation this class
generates.
either (NEED_CURSOR_ACTIVATION exception: StandardException - Thrown on error |
bind | public QueryTreeNode bind() throws StandardException(Code) | | Bind this CursorNode. This means looking up tables and columns and
getting their types, and figuring out the result types of all
expressions, as well as doing view resolution, permissions checking,
etc. It also includes determining whether an UNSPECIFIED cursor
is updatable or not, and verifying that an UPDATE cursor actually is.
The bound query tree exception: StandardException - Thrown on error |
getCursorInfo | public Object getCursorInfo() throws StandardException(Code) | | Get information about this cursor. For sps,
this is info saved off of the original query
tree (the one for the underlying query).
the cursor info exception: StandardException - thrown if generation fails |
getUpdateBaseTableName | public String getUpdateBaseTableName()(Code) | | |
getUpdateMode | public int getUpdateMode()(Code) | | |
init | public void init(Object statementType, Object resultSet, Object name, Object orderByList, Object updateMode, Object updatableColumns)(Code) | | Initializer for a CursorNode
Parameters: statementType - Type of statement (SELECT, UPDATE, INSERT) Parameters: resultSet - A ResultSetNode specifying the result set forthe cursor Parameters: name - The name of the cursor, null if no name Parameters: orderByList - The order by list for the cursor, null if noorder by list Parameters: updateMode - The user-specified update mode for the cursor,for example, CursorNode.READ_ONLY Parameters: updatableColumns - The list of updatable columns specified bythe user in the FOR UPDATE clause, null if noupdatable columns specified. May only beprovided if the updateMode parameter isCursorNode.UPDATE. |
needsSavepoint | public boolean needsSavepoint()(Code) | | Returns whether or not this Statement requires a set/clear savepoint
around its execution. The following statement "types" do not require them:
Cursor - unnecessary and won't work in a read only environment
Xact - savepoint will get blown away underneath us during commit/rollback
boolean Whether or not this Statement requires a set/clear savepoint |
optimize | public QueryTreeNode optimize() throws StandardException(Code) | | Optimize a DML statement (which is the only type of statement that
should need optimizing, I think). This method over-rides the one
in QueryTreeNode.
This method takes a bound tree, and returns an optimized tree.
It annotates the bound tree rather than creating an entirely
new tree.
Throws an exception if the tree is not bound, or if the binding
is out of date.
An optimized QueryTree exception: StandardException - Thrown on error |
printSubNodes | public void printSubNodes(int depth)(Code) | | Prints the sub-nodes of this object. See QueryTreeNode.java for
how tree printing is supposed to work.
Parameters: depth - The depth of this node in the tree |
referencesSessionSchema | public boolean referencesSessionSchema() throws StandardException(Code) | | Return true if the node references SESSION schema tables (temporary or permanent)
true if references SESSION schema tables, else false exception: StandardException - Thrown on error |
toString | public String toString()(Code) | | Convert this object to a String. See comments in QueryTreeNode.java
for how this should be done for tree printing.
This object as a String |
Methods inherited from org.apache.derby.impl.sql.compile.QueryTreeNode | public Visitable accept(Visitor v) throws StandardException(Code)(Java Doc) public QueryTreeNode bind() throws StandardException(Code)(Java Doc) public DataValueDescriptor convertDefaultNode(DataTypeDescriptor typeDescriptor) throws StandardException(Code)(Java Doc) protected static void debugFlush()(Code)(Java Doc) public static void debugPrint(String outputString)(Code)(Java Doc) public void disablePrivilegeCollection()(Code)(Java Doc) public String executeSchemaName()(Code)(Java Doc) public String executeStatementName()(Code)(Java Doc) public static String formatNodeString(String nodeString, int depth)(Code)(Java Doc) public boolean foundString(String[] list, String search)(Code)(Java Doc) public GeneratedClass generate(ByteArray ignored) throws StandardException(Code)(Java Doc) protected void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException(Code)(Java Doc) void generateAuthorizeCheck(ActivationClassBuilder acb, MethodBuilder mb, int sqlOperation)(Code)(Java Doc) public int getBeginOffset()(Code)(Java Doc) final protected ClassFactory getClassFactory()(Code)(Java Doc) final protected CompilerContext getCompilerContext()(Code)(Java Doc) final public ContextManager getContextManager()(Code)(Java Doc) public Object getCursorInfo() throws StandardException(Code)(Java Doc) final public DataDictionary getDataDictionary()(Code)(Java Doc) final public DependencyManager getDependencyManager()(Code)(Java Doc) public int getEndOffset()(Code)(Java Doc) final public ExecutionFactory getExecutionFactory()(Code)(Java Doc) final public GenericConstantActionFactory getGenericConstantActionFactory()(Code)(Java Doc) protected int getIntProperty(String value, String key) throws StandardException(Code)(Java Doc) final protected LanguageConnectionContext getLanguageConnectionContext()(Code)(Java Doc) final public NodeFactory getNodeFactory()(Code)(Java Doc) protected int getNodeType()(Code)(Java Doc) public ConstantNode getNullNode(TypeId typeId, ContextManager cm) throws StandardException(Code)(Java Doc) public DataTypeDescriptor[] getParameterTypes() throws StandardException(Code)(Java Doc) public long getRowEstimate()(Code)(Java Doc) public String getSPSName()(Code)(Java Doc) final SchemaDescriptor getSchemaDescriptor(String schemaName) throws StandardException(Code)(Java Doc) final SchemaDescriptor getSchemaDescriptor(String schemaName, boolean raiseError) throws StandardException(Code)(Java Doc) protected int getStatementType()(Code)(Java Doc) final protected TableDescriptor getTableDescriptor(String tableName, SchemaDescriptor schema) throws StandardException(Code)(Java Doc) final protected TypeCompiler getTypeCompiler(TypeId typeId)(Code)(Java Doc) public void init(Object arg1) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11, Object arg12) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11, Object arg12, Object arg13) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11, Object arg12, Object arg13, Object arg14) throws StandardException(Code)(Java Doc) public boolean isAtomic() throws StandardException(Code)(Java Doc) protected boolean isInstanceOf(int nodeType)(Code)(Java Doc) public boolean isPrivilegeCollectionRequired()(Code)(Java Doc) final boolean isSessionSchema(SchemaDescriptor sd)(Code)(Java Doc) final boolean isSessionSchema(String schemaName)(Code)(Java Doc) public ConstantAction makeConstantAction() throws StandardException(Code)(Java Doc) public ResultDescription makeResultDescription() throws StandardException(Code)(Java Doc) public TableName makeTableName(String schemaName, String flatName) throws StandardException(Code)(Java Doc) public boolean needsSavepoint()(Code)(Java Doc) protected String nodeHeader()(Code)(Java Doc) public QueryTreeNode optimize() throws StandardException(Code)(Java Doc) public static QueryTreeNode parseQueryText(CompilerContext compilerContext, String queryText, Object[] paramDefaults, LanguageConnectionContext lcc) throws StandardException(Code)(Java Doc) public void printLabel(int depth, String label)(Code)(Java Doc) public void printSubNodes(int depth)(Code)(Java Doc) public boolean referencesSessionSchema() throws StandardException(Code)(Java Doc) public TableName resolveTableToSynonym(TableName tabName) throws StandardException(Code)(Java Doc) public void setBeginOffset(int beginOffset)(Code)(Java Doc) public void setContextManager(ContextManager cm)(Code)(Java Doc) public void setEndOffset(int endOffset)(Code)(Java Doc) public void setNodeType(int nodeType)(Code)(Java Doc) public void setRefActionInfo(long fkIndexConglomId, int[] fkColArray, String parentResultSetId, boolean dependentScan)(Code)(Java Doc) public String toString()(Code)(Java Doc) public void treePrint()(Code)(Java Doc) public void treePrint(int depth)(Code)(Java Doc) String verifyClassExist(String javaClassName, boolean convertCase) throws StandardException(Code)(Java Doc)
|
|
|