org.apache.derby.impl.sql.compile
Class StatementNode

java.lang.Object
  extended byorg.apache.derby.impl.sql.compile.QueryTreeNode
      extended byorg.apache.derby.impl.sql.compile.StatementNode
All Implemented Interfaces:
Visitable
Direct Known Subclasses:
DDLStatementNode, DMLStatementNode, ExecSPSNode, MiscellaneousStatementNode, NOPStatementNode, TransactionStatementNode

public abstract class StatementNode
extends QueryTreeNode

A StatementNode represents a single statement in the language. It is the top node for any statement.

StatementNode controls the class generation for query tree nodes.

Author:
Jeff Lichtman

Field Summary
(package private) static int NEED_CURSOR_ACTIVATION
           
(package private) static int NEED_DDL_ACTIVATION
          create the outer shell class builder for the class we will be generating, generate the expression to stuff in it, and turn it into a class.
(package private) static int NEED_NOTHING_ACTIVATION
           
(package private) static int NEED_PARAM_ACTIVATION
           
(package private) static int NEED_ROW_ACTIVATION
           
 
Fields inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode
AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX, beginOffset, endOffset
 
Constructor Summary
StatementNode()
           
 
Method Summary
(package private) abstract  int activationKind()
           
 GeneratedClass generate(ByteArray byteCode)
          Do code generation for this statement.
 boolean isAtomic()
          By default, assume StatementNodes are atomic.
protected  TableDescriptor lockTableForCompilation(TableDescriptor td)
           
abstract  java.lang.String statementToString()
           
 java.lang.String toString()
          Convert this object to a String.
 
Methods inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode
accept, bind, convertDefaultNode, debugFlush, debugPrint, executeSchemaName, executeStatementName, formatNodeString, foundString, generate, generateAuthorizeCheck, getBeginOffset, getClassFactory, getCompilerContext, getContextManager, getCursorInfo, getDataDictionary, getDependencyManager, getEndOffset, getExecutionFactory, getGenericConstantActionFactory, getIntProperty, getLanguageConnectionContext, getNodeFactory, getNodeType, getNullNode, getParameterTypes, getRowEstimate, getSchemaDescriptor, getSchemaDescriptor, getSPSName, getStatementType, getTableDescriptor, getTypeCompiler, init, init, init, init, init, init, init, init, init, init, init, init, init, init, isInstanceOf, isSessionSchema, isSessionSchema, makeConstantAction, makeResultDescription, makeTableName, needsSavepoint, nodeHeader, optimize, parseQueryText, printLabel, printSubNodes, referencesSessionSchema, setBeginOffset, setContextManager, setEndOffset, setNodeType, setRefActionInfo, treePrint, treePrint, verifyClassExist
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NEED_DDL_ACTIVATION

static final int NEED_DDL_ACTIVATION
create the outer shell class builder for the class we will be generating, generate the expression to stuff in it, and turn it into a class.

See Also:
Constant Field Values

NEED_CURSOR_ACTIVATION

static final int NEED_CURSOR_ACTIVATION
See Also:
Constant Field Values

NEED_PARAM_ACTIVATION

static final int NEED_PARAM_ACTIVATION
See Also:
Constant Field Values

NEED_ROW_ACTIVATION

static final int NEED_ROW_ACTIVATION
See Also:
Constant Field Values

NEED_NOTHING_ACTIVATION

static final int NEED_NOTHING_ACTIVATION
See Also:
Constant Field Values
Constructor Detail

StatementNode

public StatementNode()
Method Detail

isAtomic

public boolean isAtomic()
                 throws StandardException
By default, assume StatementNodes are atomic. The rare statements that aren't atomic (e.g. CALL method()) override this.

Overrides:
isAtomic in class QueryTreeNode
Returns:
true if the statement is atomic
Throws:
StandardException - Thrown on error

toString

public java.lang.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 QueryTreeNode
Returns:
This object as a String

statementToString

public abstract java.lang.String statementToString()

activationKind

abstract int activationKind()

lockTableForCompilation

protected TableDescriptor lockTableForCompilation(TableDescriptor td)
                                           throws StandardException
Throws:
StandardException

generate

public GeneratedClass generate(ByteArray byteCode)
                        throws StandardException
Do code generation for this statement.

Overrides:
generate in class QueryTreeNode
Parameters:
byteCode - - ignored (he he)
Returns:
A GeneratedClass for this statement
Throws:
StandardException - Thrown on error


Apache Derby V10.0 Engine Documentation - Copyright © 1997,2004 The Apache Software Foundation or its licensors, as applicable.