Top Description Fields Constructors Methods
org.apache.derby.impl.sql.compile

pack-priv Class OrderByNode

extends SingleChildResultSetNode
Class Inheritance
Imports
java.util.Properties, org.apache.derby.shared.common.error.StandardException, org.apache.derby.iapi.services.compiler.MethodBuilder, org.apache.derby.iapi.services.context.ContextManager, org.apache.derby.shared.common.sanity.SanityManager, org.apache.derby.iapi.sql.ResultColumnDescriptor

An OrderByNode represents a result set for a sort operation for an order by list. It is expected to only be generated at the end of optimization, once we have determined that a sort is required.

Field Summary

Modifier and TypeField and Description
pack-priv OrderByList
Inherited from org.apache.derby.impl.sql.compile.SingleChildResultSetNode:
childResulthasTrulyTheBestAccessPath

Constructor Summary

AccessConstructor and Description
pack-priv
OrderByNode(ResultSetNode
The child ResultSetNode
childRes
,
OrderByList
The order by list.
orderByList
,
Properties
Properties list associated with the table
tableProperties
,
ContextManager
The context manager
cm
)

Constructor for a OrderByNode.

Method Summary

Modifier and TypeMethod and Description
pack-priv void
generate(ActivationClassBuilder
The ActivationClassBuilder for the class being built
acb
,
MethodBuilder
The method for the generated code to go into
mb
)

Overrides org.apache.derby.impl.sql.compile.QueryTreeNode.generate.

generate the distinct result set operating over the source result set.

pack-priv ResultColumnDescriptor[]
pack-priv void
printSubNodes(int
The depth of this node in the tree
depth
)

Overrides org.apache.derby.impl.sql.compile.SingleChildResultSetNode.printSubNodes.

Prints the sub-nodes of this object.

Inherited from org.apache.derby.impl.sql.compile.SingleChildResultSetNode:
acceptChildrenaddNewPredicateadjustForSortEliminationadjustForSortEliminationchangeAccessPathdecrementLevelensurePredicateListflattenableInFromSubqueryforUpdategetChildResultgetFinalCostEstimategetFromTableByNamegetTrulyTheBestAccessPathinitAccessPathsisNotExistsisOneRowResultSetisOrderedOnmodifyAccessPathsoptimizepreprocesspullOptPredicatespushExpressionsreferencesSessionSchemareferencesTargetreflectionNeededForProjectionsetChildResultsetLevelsubqueryReferencesTargetupdateBestPlanMapupdateTargetLockMode

Field Detail

orderByListback to summary
pack-priv OrderByList orderByList

Constructor Detail

OrderByNodeback to summary
pack-priv OrderByNode(ResultSetNode childRes, OrderByList orderByList, Properties tableProperties, ContextManager cm) throws StandardException

Constructor for a OrderByNode.

Parameters
childRes:ResultSetNode

The child ResultSetNode

orderByList:OrderByList

The order by list.

tableProperties:Properties

Properties list associated with the table

cm:ContextManager

The context manager

Exceptions
StandardException:
Thrown on error

Method Detail

generateback to summary
pack-priv void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException

Overrides org.apache.derby.impl.sql.compile.QueryTreeNode.generate.

generate the distinct result set operating over the source result set.

Parameters
acb:ActivationClassBuilder

Doc from org.apache.derby.impl.sql.compile.QueryTreeNode.generate.

The ActivationClassBuilder for the class being built

mb:MethodBuilder

Doc from org.apache.derby.impl.sql.compile.QueryTreeNode.generate.

The method for the generated code to go into

Annotations
@Override
Exceptions
StandardException:
Thrown on error
makeResultDescriptorsback to summary
pack-priv ResultColumnDescriptor[] makeResultDescriptors()

Overrides org.apache.derby.impl.sql.compile.ResultSetNode.makeResultDescriptors.

Annotations
@Override
printSubNodesback to summary
pack-priv void printSubNodes(int depth)

Overrides org.apache.derby.impl.sql.compile.SingleChildResultSetNode.printSubNodes.

Prints the sub-nodes of this object. See QueryTreeNode.java for how tree printing is supposed to work.

Parameters
depth:int

The depth of this node in the tree

Annotations
@Override