Optimizable, Visitablepublic final class CurrentOfNode extends FromTable
ResultSetNode.QueryExpressionClauses| Modifier and Type | Field | Description |
|---|---|---|
private TableName |
baseTableName |
|
private java.lang.String |
cursorName |
|
private FromBaseTable |
dummyTargetTable |
|
private TableName |
exposedTableName |
|
private ExecPreparedStatement |
preStmt |
|
private CostEstimate |
singleScanCostEstimate |
ADD_PLAN, bestAccessPath, bestCostEstimate, bestSortAvoidancePath, correlationName, corrTableName, currentAccessPath, hashKeyColumns, initialCapacity, level, LOAD_PLAN, loadFactor, maxCapacity, origTableName, REMOVE_PLAN, tableNumber, tableProperties, trulyTheBestAccessPath, userSpecifiedJoinStrategyAUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_CYCLE, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX| Constructor | Description |
|---|---|
CurrentOfNode(java.lang.String correlationName,
java.lang.String cursor,
java.util.Properties tableProperties,
ContextManager cm) |
| Modifier and Type | Method | Description |
|---|---|---|
(package private) void |
acceptChildren(Visitor v) |
Accept the visitor for all visitable children of this node.
|
(package private) void |
bindExpressions(FromList fromListParam) |
Bind the expressions in this ResultSetNode.
|
(package private) ResultSetNode |
bindNonVTITables(DataDictionary dataDictionary,
FromList fromListParam) |
Binding this FromTable means finding the prepared statement
for the cursor and creating the result columns (the columns
updatable on that cursor).
|
CostEstimate |
estimateCost(OptimizablePredicateList predList,
ConglomerateDescriptor cd,
CostEstimate outerCost,
Optimizer optimizer,
RowOrdering rowOrdering) |
Estimate the cost of scanning this Optimizable using the given
predicate list with the given conglomerate.
|
(package private) void |
generate(ActivationClassBuilder acb,
MethodBuilder mb) |
Generation on a CurrentOfNode creates a scan on the
cursor, CurrentOfResultSet.
|
(package private) TableName |
getBaseCursorTargetTableName() |
|
(package private) java.lang.String |
getCursorName() |
|
(package private) ExecPreparedStatement |
getCursorStatement() |
Return the CursorNode associated with a positioned update/delete.
|
(package private) java.lang.String |
getExposedName() |
Get the exposed name for this table, which is the name that can
be used to refer to it in the rest of the query.
|
(package private) TableName |
getExposedTableName() |
|
(package private) ResultColumn |
getMatchingColumn(ColumnReference columnReference) |
Try to find a ResultColumn in the table represented by this CurrentOfNode
that matches the name in the given ColumnReference.
|
(package private) static CurrentOfNode |
makeForMerge(java.lang.String cursorName,
FromBaseTable dummyTargetTable,
ContextManager cm) |
Construct a dummy CurrentOfNode just for compiling the DELETE action of a MERGE
statement.
|
(package private) ResultSetNode |
optimize(DataDictionary dataDictionary,
PredicateList predicateList,
double outerRows) |
Optimize this CurrentOfNode.
|
(package private) ResultSetNode |
preprocess(int numTables,
GroupByList gbl,
FromList fromList) |
Preprocess a CurrentOfNode.
|
(package private) void |
printSubNodes(int depth) |
Prints the sub-nodes of this object.
|
java.lang.String |
toString() |
Convert this object to a String.
|
int |
updateTargetLockMode() |
Get the lock mode for this table as the target of an update statement
(a delete or update).
|
assignCostEstimate, canBeOrdered, columnsAreUpdatable, considerSortAvoidancePath, convertAbsoluteToRelativeColumnPosition, cursorTargetTable, decrementLevel, feasibleJoinStrategy, fillInReferencedTableMap, flatten, forUpdate, getBaseTableName, getBestAccessPath, getBestSortAvoidancePath, getCorrelationName, getCostEstimate, getCurrentAccessPath, getFinalCostEstimate, getFromTableByName, getLevel, getMergeTableID, getName, getNumColumnsReturned, getOrigTableName, getProperties, getResultColumnsForList, getSchemaDescriptor, getSchemaDescriptor, getScratchCostEstimate, getTableDescriptor, getTableName, getTableNumber, getTrulyTheBestAccessPath, getUserSpecifiedJoinStrategy, hashKeyColumns, hasLargeObjectColumns, hasTableNumber, initAccessPaths, initialCapacity, isBaseTable, isCoveringIndex, isFlattenableJoinNode, isJoinColumnForRightOuterJoin, isMaterializable, isOneRowScan, isTargetTable, legalJoinOrder, loadFactor, LOJ_reorderable, markUpdatableByCursor, maxCapacity, memoryUsageOK, modifyAccessPath, needsSpecialRCLBinding, nextAccessPath, optimizeIt, optimizeSubqueries, pullOptPredicates, pushExpressions, pushOptPredicate, rememberAsBest, rememberJoinStrategyAsBest, rememberSortAvoidancePath, resetJoinStrategies, setCostEstimateCost, setHashKeyColumns, setLevel, setMergeTableID, setOrigTableName, setProperties, setTableNumber, startOptimizing, supportsMultipleInstantiations, tellRowOrderingAboutConstantColumns, transformOuterJoins, uniqueJoin, updateBestPlanMap, verifyPropertiesclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDataDictionary, getOptimizerTracer, getReferencedTableMap, getResultSetNumber, optimizerTracingIsOnaccept, addTag, addUDTUsagePriv, addUDTUsagePriv, bindOffsetFetch, bindRowMultiSet, bindUserCatalogType, bindUserType, checkReliability, checkReliability, convertDefaultNode, copyTagsFrom, createTypeDependency, debugFlush, debugPrint, disablePrivilegeCollection, formatNodeString, 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, isAtomic, isPrivilegeCollectionRequired, isSessionSchema, isSessionSchema, makeConstantAction, makeTableName, makeTableName, nodeHeader, optimizerTracingIsOn, orReliability, parseSearchCondition, parseStatement, printLabel, referencesSessionSchema, resolveTableToSynonym, setBeginOffset, setEndOffset, setRefActionInfo, stackPrint, taggedWith, treePrint, treePrint, verifyClassExistaddNewPredicate, adjustForSortElimination, adjustForSortElimination, assignResultSetNumber, bindExpressionsWithTables, bindResultColumns, bindResultColumns, bindTargetExpressions, bindUntypedNullsToResultColumns, bindVTITables, changeAccessPath, columnTypesAndLengthsMatch, considerMaterialization, enhanceRCLForInsert, ensurePredicateList, flattenableInFromSubquery, generateNormalizationResultSet, generateResultSet, genProjectRestrict, genProjectRestrict, genProjectRestrictForReordering, getAllResultColumns, getCandidateFinalCostEstimate, getCostEstimate, getCursorTargetTable, getFromList, getNewCostEstimate, getOptimizer, getOptimizerImpl, getRCLForInsert, getReferencedTableMap, getResultColumns, getResultSetNumber, getScratchCostEstimate, isCursorTargetTable, isInsertSource, isNotExists, isOneRowResultSet, isOrderedOn, isPossibleDistinctScan, isStatementResultSet, isUpdatableCursor, LOJgetReferencedTables, makeResultDescription, makeResultDescriptors, markAsCursorTargetTable, markForDistinctScan, markStatementResultSet, modifyAccessPaths, modifyAccessPaths, notCursorTargetTable, notFlattenableJoin, numDistinctAggregates, parseDefault, performMaterialization, printQueryExpressionSuffixClauses, projectResultColumns, pushOffsetFetchFirst, pushOrderByList, pushQueryExpressionSuffix, referencesTarget, rejectParameters, rejectXMLValues, renameGeneratedResultNames, replaceOrForbidDefaults, returnsAtMostOneRow, setCandidateFinalCostEstimate, setCostEstimate, setCursorTargetTable, setInsertSource, setOptimizer, setReferencedTableMap, setResultColumns, setResultSetNumber, setResultToBooleanTrueNode, setScratchCostEstimate, setTableConstructorTypes, subqueryReferencesTarget, verifySelectStarSubqueryaccept, addTag, taggedWithprivate java.lang.String cursorName
private ExecPreparedStatement preStmt
private TableName exposedTableName
private TableName baseTableName
private CostEstimate singleScanCostEstimate
private FromBaseTable dummyTargetTable
CurrentOfNode(java.lang.String correlationName,
java.lang.String cursor,
java.util.Properties tableProperties,
ContextManager cm)
static CurrentOfNode makeForMerge(java.lang.String cursorName, FromBaseTable dummyTargetTable, ContextManager cm)
Construct a dummy CurrentOfNode just for compiling the DELETE action of a MERGE statement.
public CostEstimate estimateCost(OptimizablePredicateList predList, ConglomerateDescriptor cd, CostEstimate outerCost, Optimizer optimizer, RowOrdering rowOrdering) throws StandardException
OptimizableestimateCost in interface OptimizableestimateCost in class FromTablepredList - The predicate list to optimize againstcd - The conglomerate descriptor to get the cost ofouterCost - The estimated cost of the part of the plan outer
to this optimizable.optimizer - The optimizer to use to help estimate the costrowOrdering - The row ordering for all the tables in the
join order, including this one.StandardException - Thrown on errorOptimizable.estimateCost(org.apache.derby.iapi.sql.compile.OptimizablePredicateList, org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor, org.apache.derby.iapi.sql.compile.CostEstimate, org.apache.derby.iapi.sql.compile.Optimizer, org.apache.derby.iapi.sql.compile.RowOrdering)ResultSetNode bindNonVTITables(DataDictionary dataDictionary, FromList fromListParam) throws StandardException
bindNonVTITables in class ResultSetNodedataDictionary - The DataDictionary to use for bindingfromListParam - FromList to use/append to.StandardException - Thrown on errorvoid bindExpressions(FromList fromListParam)
bindExpressions in class ResultSetNodefromListParam - FromList to use/append to.ResultColumn getMatchingColumn(ColumnReference columnReference) throws StandardException
getMatchingColumn in class ResultSetNodecolumnReference - The columnReference whose name we're looking
for in the given table.StandardException - Thrown on errorResultSetNode preprocess(int numTables, GroupByList gbl, FromList fromList) throws StandardException
preprocess in class ResultSetNodenumTables - The number of tables in the DML Statementgbl - The group by list, if anyfromList - The from list, if anyStandardException - Thrown on errorResultSetNode optimize(DataDictionary dataDictionary, PredicateList predicateList, double outerRows) throws StandardException
optimize in class ResultSetNodedataDictionary - The DataDictionary to use for optimizationpredicateList - The PredicateList to optimize. This should
be a single-table predicate with the table
the same as the table in this FromTable.outerRows - The number of outer joining rowsStandardException - Thrown on errorvoid generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException
This routine will generate and return a call of the form:
ResultSetFactory.getCurrentOfResultSet(cursorName)
generate in class QueryTreeNodeacb - The ActivationClassBuilder for the class being builtmb - The execute() method to be builtStandardException - Thrown on errorvoid printSubNodes(int depth)
printSubNodes in class ResultSetNodedepth - The depth of this node in the treepublic java.lang.String toString()
java.lang.String getExposedName()
FromTablegetExposedName in class FromTablepublic int updateTargetLockMode()
updateTargetLockMode in class ResultSetNodeTransactionControllerTableName getExposedTableName()
TableName getBaseCursorTargetTableName()
java.lang.String getCursorName()
ExecPreparedStatement getCursorStatement()
void acceptChildren(Visitor v) throws StandardException
ResultSetNodeacceptChildren in class FromTablev - the visitorStandardException - on errorApache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.