public abstract class StatementNode extends QueryTreeNode
StatementNode controls the class generation for query tree nodes.
Modifier and Type | Field and Description |
---|---|
(package private) static TableDescriptor[] |
EMPTY_TD_LIST
Cached empty list object.
|
(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 |
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX
Constructor and Description |
---|
StatementNode() |
Modifier and Type | Method and Description |
---|---|
(package private) abstract int |
activationKind() |
void |
bindStatement()
Perform the binding operation statement.
|
java.lang.String |
executeSchemaName()
Returns name of schema in EXECUTE STATEMENT command.
|
java.lang.String |
executeStatementName()
Returns the name of statement in EXECUTE STATEMENT command.
|
GeneratedClass |
generate(ByteArray byteCode)
Do code generation for this statement.
|
java.lang.String |
getSPSName()
Get the name of the SPS that is used to execute this statement.
|
boolean |
isAtomic()
By default, assume StatementNodes are atomic.
|
protected TableDescriptor |
lockTableForCompilation(TableDescriptor td) |
ResultDescription |
makeResultDescription()
Only DML statements have result descriptions - for all others return
null.
|
boolean |
needsSavepoint()
Returns whether or not this Statement requires a set/clear savepoint
around its execution.
|
void |
optimizeStatement()
Generates an optimized statement from a bound StatementNode.
|
abstract java.lang.String |
statementToString() |
java.lang.String |
toString()
Convert this object to a String.
|
TableDescriptor[] |
updateIndexStatisticsFor()
Returns a list of base tables for which the index statistics of the
associated indexes should be updated.
|
accept, acceptChildren, bindOffsetFetch, bindRowMultiSet, bindUserCatalogType, bindUserType, checkReliability, checkReliability, convertDefaultNode, createTypeDependency, debugFlush, debugPrint, disablePrivilegeCollection, formatNodeString, foundString, generate, generateAuthorizeCheck, getBeginOffset, getClassFactory, getCompilerContext, getContextManager, getCursorInfo, getDataDictionary, getDependencyManager, getEndOffset, getExecutionFactory, getGenericConstantActionFactory, getIntProperty, getLanguageConnectionContext, getNodeFactory, getNodeType, getNullNode, getParameterTypes, getSchemaDescriptor, getSchemaDescriptor, getStatementType, getTableDescriptor, getTypeCompiler, init, init, init, init, init, init, init, init, init, init, init, init, init, init, isInstanceOf, isPrivilegeCollectionRequired, isSessionSchema, isSessionSchema, makeConstantAction, makeTableName, makeTableName, nodeHeader, orReliability, parseStatement, printLabel, printSubNodes, referencesSessionSchema, resolveTableToSynonym, setBeginOffset, setContextManager, setEndOffset, setNodeType, setRefActionInfo, stackPrint, treePrint, treePrint, verifyClassExist
static final TableDescriptor[] EMPTY_TD_LIST
static final int NEED_DDL_ACTIVATION
static final int NEED_CURSOR_ACTIVATION
static final int NEED_PARAM_ACTIVATION
static final int NEED_ROW_ACTIVATION
static final int NEED_NOTHING_ACTIVATION
public boolean isAtomic() throws StandardException
isAtomic
in class QueryTreeNode
StandardException
- Thrown on errorpublic boolean needsSavepoint()
ONLY CALLABLE AFTER GENERATION
This implementation returns true, sub-classes can override the method to not require a savepoint.
public java.lang.String getSPSName()
public java.lang.String executeStatementName()
public java.lang.String executeSchemaName()
public ResultDescription makeResultDescription()
public java.lang.String toString()
toString
in class QueryTreeNode
public abstract java.lang.String statementToString()
public void bindStatement() throws StandardException
StandardException
- Thrown on errorpublic void optimizeStatement() throws StandardException
StandardException
- Thrown on errorabstract int activationKind()
protected TableDescriptor lockTableForCompilation(TableDescriptor td) throws StandardException
StandardException
public GeneratedClass generate(ByteArray byteCode) throws StandardException
byteCode
- the generated byte code for this statement.
if non-null, then the byte code is saved
here.StandardException
- Thrown on errorpublic TableDescriptor[] updateIndexStatisticsFor() throws StandardException
This default implementation always returns an empty list.
StandardException
- if accessing the index descriptors of a base
table failsApache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.