Visitable
DDLStatementNode
, DMLStatementNode
, ExecSPSNode
, MiscellaneousStatementNode
, NOPStatementNode
, TransactionStatementNode
public abstract class StatementNode extends QueryTreeNode
StatementNode controls the class generation for query tree nodes.
Modifier and Type | Field | 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_CYCLE, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX
Constructor | Description |
---|---|
StatementNode(ContextManager cm) |
Modifier and Type | Method | 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.Object |
getCursorInfo() |
Get an object with information about the cursor if there is one.
|
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.
|
(package private) 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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
accept, acceptChildren, addTag, addUDTUsagePriv, addUDTUsagePriv, bindOffsetFetch, bindRowMultiSet, bindUserCatalogType, bindUserType, checkReliability, checkReliability, convertDefaultNode, copyTagsFrom, createTypeDependency, debugFlush, debugPrint, disablePrivilegeCollection, formatNodeString, generate, generateAuthorizeCheck, getBeginOffset, getClassFactory, getCompilerContext, getContext, getContextManager, getDataDictionary, getDependencyManager, getEndOffset, getExecutionFactory, getGenericConstantActionFactory, getIntProperty, getLanguageConnectionContext, getLongProperty, getNullNode, getOffsetOrderedNodes, getOptimizerFactory, getOptimizerTracer, getParameterTypes, getSchemaDescriptor, getSchemaDescriptor, getStatementType, getTableDescriptor, getTypeCompiler, getUDTDesc, isPrivilegeCollectionRequired, isSessionSchema, isSessionSchema, makeConstantAction, makeTableName, makeTableName, nodeHeader, optimizerTracingIsOn, orReliability, parseSearchCondition, parseStatement, printLabel, printSubNodes, referencesSessionSchema, resolveTableToSynonym, setBeginOffset, setEndOffset, setRefActionInfo, stackPrint, taggedWith, 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
StatementNode(ContextManager cm)
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.Object getCursorInfo() throws StandardException
StandardException
public java.lang.String toString()
toString
in class QueryTreeNode
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.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.