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

public final Class RowCountNode

extends SingleChildResultSetNode
Class Inheritance
Imports
org.apache.derby.shared.common.error.StandardException, org.apache.derby.iapi.services.compiler.MethodBuilder, org.apache.derby.shared.common.sanity.SanityManager, org.apache.derby.iapi.services.classfile.VMOpcode, org.apache.derby.shared.common.reference.ClassName, org.apache.derby.iapi.services.context.ContextManager

The result set generated by this node (RowCountResultSet) implements the filtering of rows needed for the and the . It sits on top of the normal SELECT's top result set, but under any ScrollInsensitiveResultSet. The latter's positioning is needed for the correct functioning of and in the presence of scrollable and/or updatable result sets and CURRENT OF cursors.

Field Summary

Modifier and TypeField and Description
private ValueNode
fetchFirst

If not null, this represents the value of a <fetch first clause>.

private boolean
hasJDBClimitClause

True if the offset/fetchFirst clauses were added by JDBC LIMIT syntax.

private ValueNode
offset

If not null, this represents the value of a <result offset clause>.

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

Constructor Summary

AccessConstructor and Description
pack-priv
RowCountNode(ResultSetNode
The result set for which we want to get only a subset
childResult
,
ResultColumnList
The result columns we want
rcl
,
ValueNode
The offset, if any, in the result set
offset
,
ValueNode
The number of rows to inspect to get
fetchFirst
,
boolean
true if a JDBC limit syntax was used
hasJDBClimitClause
,
ContextManager
The context manager
cm
)

Constructor for a RowCountNode

Method Summary

Modifier and TypeMethod and Description
pack-priv void
generate(ActivationClassBuilder
activation class builder
acb
,
MethodBuilder
method builder
mb
)

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

Generate code.

private void
public String

Returns:

This object as a String
toString
()

Overrides org.apache.derby.impl.sql.compile.FromTable.toString.

Convert this object to a String.

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

Field Detail

fetchFirstback to summary
private ValueNode fetchFirst

If not null, this represents the value of a .

hasJDBClimitClauseback to summary
private boolean hasJDBClimitClause

True if the offset/fetchFirst clauses were added by JDBC LIMIT syntax.

offsetback to summary
private ValueNode offset

If not null, this represents the value of a .

Constructor Detail

RowCountNodeback to summary
pack-priv RowCountNode(ResultSetNode childResult, ResultColumnList rcl, ValueNode offset, ValueNode fetchFirst, boolean hasJDBClimitClause, ContextManager cm) throws StandardException

Constructor for a RowCountNode

Parameters
childResult:ResultSetNode

The result set for which we want to get only a subset

rcl:ResultColumnList

The result columns we want

offset:ValueNode

The offset, if any, in the result set

fetchFirst:ValueNode

The number of rows to inspect to get

hasJDBClimitClause:boolean

true if a JDBC limit syntax was used

cm:ContextManager

The context manager

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 code.

Parameters
acb:ActivationClassBuilder

activation class builder

mb:MethodBuilder

method builder

Annotations
@Override
Exceptions
StandardException:
Thrown on error
generateExprFunback to summary
private void generateExprFun(ExpressionClassBuilder ecb, MethodBuilder mb, ValueNode vn) throws StandardException
toStringback to summary
public String toString()

Overrides org.apache.derby.impl.sql.compile.FromTable.toString.

Convert this object to a String. See comments in QueryTreeNode.java for how this should be done for tree printing.

Returns:String

This object as a String

Annotations
@Override