| java.lang.Object org.apache.derby.impl.sql.execute.GenericResultSetFactory
GenericResultSetFactory | public class GenericResultSetFactory implements ResultSetFactory(Code) | | ResultSetFactory provides a wrapper around all of
the result sets used in this execution implementation.
This removes the need of generated classes to do a new
and of the generator to know about all of the result
sets. Both simply know about this interface to getting
them.
In terms of modularizing, we can create just an interface
to this class and invoke the interface. Different implementations
would get the same information provided but could potentially
massage/ignore it in different ways to satisfy their
implementations. The practicality of this is to be seen.
The cost of this type of factory is that once you touch it,
you touch *all* of the possible result sets, not just
the ones you need. So the first time you touch it could
be painful ... that might be a problem for execution.
author: ames |
Method Summary | |
public NoPutResultSet | getAnyResultSet(NoPutResultSet source, GeneratedMethod emptyRowFun, int resultSetNumber, int subqueryNumber, int pointOfAttachment, double optimizerEstimatedRowCount, double optimizerEstimatedCost) | public NoPutResultSet | getBulkTableScanResultSet(Activation activation, long conglomId, int scociItem, GeneratedMethod resultRowAllocator, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchOperator, boolean sameStartStopPosition, Qualifier[][] qualifiers, String tableName, String userSuppliedOptimizerOverrides, String indexName, boolean isConstraint, boolean forUpdate, int colRefItem, int indexColItem, int lockMode, boolean tableLocked, int isolationLevel, int rowsPerRead, boolean oneRowScan, double optimizerEstimatedRowCount, double optimizerEstimatedCost) | public ResultSet | getCallStatementResultSet(GeneratedMethod methodCall, Activation activation) | public NoPutResultSet | getCurrentOfResultSet(String cursorName, Activation activation, int resultSetNumber, String psName) | public ResultSet | getDDLResultSet(Activation activation) | public ResultSet | getDeleteCascadeResultSet(NoPutResultSet source, int constantActionItem, ResultSet[] dependentResultSets, String resultSetId) | public ResultSet | getDeleteCascadeUpdateResultSet(NoPutResultSet source, GeneratedMethod checkGM, int constantActionItem, int rsdItem) | public ResultSet | getDeleteResultSet(NoPutResultSet source) | public ResultSet | getDeleteVTIResultSet(NoPutResultSet source) | public NoPutResultSet | getDistinctGroupedAggregateResultSet(NoPutResultSet source, boolean isInSortedOrder, int aggregateItem, int orderItem, GeneratedMethod rowAllocator, int maxRowSize, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost) | public NoPutResultSet | getDistinctScalarAggregateResultSet(NoPutResultSet source, boolean isInSortedOrder, int aggregateItem, int orderItem, GeneratedMethod rowAllocator, int maxRowSize, int resultSetNumber, boolean singleInputRow, double optimizerEstimatedRowCount, double optimizerEstimatedCost) | public NoPutResultSet | getDistinctScanResultSet(Activation activation, long conglomId, int scociItem, GeneratedMethod resultRowAllocator, int resultSetNumber, int hashKeyColumn, String tableName, String userSuppliedOptimizerOverrides, String indexName, boolean isConstraint, int colRefItem, int lockMode, boolean tableLocked, int isolationLevel, double optimizerEstimatedRowCount, double optimizerEstimatedCost) a distinct scan generator, for ease of use at present. | public NoPutResultSet | getGroupedAggregateResultSet(NoPutResultSet source, boolean isInSortedOrder, int aggregateItem, int orderItem, GeneratedMethod rowAllocator, int maxRowSize, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost) | public NoPutResultSet | getHashJoinResultSet(NoPutResultSet leftResultSet, int leftNumCols, NoPutResultSet rightResultSet, int rightNumCols, GeneratedMethod joinClause, int resultSetNumber, boolean oneRowRightSide, boolean notExistsRightSide, double optimizerEstimatedRowCount, double optimizerEstimatedCost, String userSuppliedOptimizerOverrides) | public NoPutResultSet | getHashLeftOuterJoinResultSet(NoPutResultSet leftResultSet, int leftNumCols, NoPutResultSet rightResultSet, int rightNumCols, GeneratedMethod joinClause, int resultSetNumber, GeneratedMethod emptyRowFun, boolean wasRightOuterJoin, boolean oneRowRightSide, boolean notExistsRightSide, double optimizerEstimatedRowCount, double optimizerEstimatedCost, String userSuppliedOptimizerOverrides) | public NoPutResultSet | getHashScanResultSet(Activation activation, long conglomId, int scociItem, GeneratedMethod resultRowAllocator, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchOperator, boolean sameStartStopPosition, Qualifier[][] scanQualifiers, Qualifier[][] nextQualifiers, int initialCapacity, float loadFactor, int maxCapacity, int hashKeyColumn, String tableName, String userSuppliedOptimizerOverrides, String indexName, boolean isConstraint, boolean forUpdate, int colRefItem, int indexColItem, int lockMode, boolean tableLocked, int isolationLevel, double optimizerEstimatedRowCount, double optimizerEstimatedCost) a hash scan generator, for ease of use at present. | public NoPutResultSet | getHashTableResultSet(NoPutResultSet source, GeneratedMethod singleTableRestriction, Qualifier[][] equijoinQualifiers, GeneratedMethod projection, int resultSetNumber, int mapRefItem, boolean reuseResult, int keyColItem, boolean removeDuplicates, long maxInMemoryRowCount, int initialCapacity, float loadFactor, double optimizerEstimatedRowCount, double optimizerEstimatedCost) | public NoPutResultSet | getIndexRowToBaseRowResultSet(long conglomId, int scociItem, NoPutResultSet source, GeneratedMethod resultRowAllocator, int resultSetNumber, String indexName, int heapColRefItem, int indexColRefItem, int indexColMapItem, GeneratedMethod restriction, boolean forUpdate, double optimizerEstimatedRowCount, double optimizerEstimatedCost) | public ResultSet | getInsertResultSet(NoPutResultSet source, GeneratedMethod checkGM) | public ResultSet | getInsertVTIResultSet(NoPutResultSet source, NoPutResultSet vtiRS) | public NoPutResultSet | getLastIndexKeyResultSet(Activation activation, int resultSetNumber, GeneratedMethod resultRowAllocator, long conglomId, String tableName, String userSuppliedOptimizerOverrides, String indexName, int colRefItem, int lockMode, boolean tableLocked, int isolationLevel, double optimizerEstimatedRowCount, double optimizerEstimatedCost) A last index key sresult set returns the last row from
the index in question. | public NoPutResultSet | getMaterializedResultSet(NoPutResultSet source, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost) | public ResultSet | getMiscResultSet(Activation activation) | public NoPutResultSet | getNestedLoopJoinResultSet(NoPutResultSet leftResultSet, int leftNumCols, NoPutResultSet rightResultSet, int rightNumCols, GeneratedMethod joinClause, int resultSetNumber, boolean oneRowRightSide, boolean notExistsRightSide, double optimizerEstimatedRowCount, double optimizerEstimatedCost, String userSuppliedOptimizerOverrides) | public NoPutResultSet | getNestedLoopLeftOuterJoinResultSet(NoPutResultSet leftResultSet, int leftNumCols, NoPutResultSet rightResultSet, int rightNumCols, GeneratedMethod joinClause, int resultSetNumber, GeneratedMethod emptyRowFun, boolean wasRightOuterJoin, boolean oneRowRightSide, boolean notExistsRightSide, double optimizerEstimatedRowCount, double optimizerEstimatedCost, String userSuppliedOptimizerOverrides) | public NoPutResultSet | getNormalizeResultSet(NoPutResultSet source, int resultSetNumber, int erdNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost, boolean forUpdate) | public NoPutResultSet | getOnceResultSet(NoPutResultSet source, GeneratedMethod emptyRowFun, int cardinalityCheck, int resultSetNumber, int subqueryNumber, int pointOfAttachment, double optimizerEstimatedRowCount, double optimizerEstimatedCost) | public NoPutResultSet | getProjectRestrictResultSet(NoPutResultSet source, GeneratedMethod restriction, GeneratedMethod projection, int resultSetNumber, GeneratedMethod constantRestriction, int mapRefItem, boolean reuseResult, boolean doesProjection, double optimizerEstimatedRowCount, double optimizerEstimatedCost) | public NoPutResultSet | getRaDependentTableScanResultSet(Activation activation, long conglomId, int scociItem, GeneratedMethod resultRowAllocator, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchOperator, boolean sameStartStopPosition, Qualifier[][] qualifiers, String tableName, String userSuppliedOptimizerOverrides, String indexName, boolean isConstraint, boolean forUpdate, int colRefItem, int indexColItem, int lockMode, boolean tableLocked, int isolationLevel, boolean oneRowScan, double optimizerEstimatedRowCount, double optimizerEstimatedCost, String parentResultSetId, long fkIndexConglomId, int fkColArrayItem, int rltItem) a referential action dependent table scan generator. | public NoPutResultSet | getRowResultSet(Activation activation, GeneratedMethod row, boolean canCacheRow, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost) | public NoPutResultSet | getScalarAggregateResultSet(NoPutResultSet source, boolean isInSortedOrder, int aggregateItem, int orderItem, GeneratedMethod rowAllocator, int maxRowSize, int resultSetNumber, boolean singleInputRow, double optimizerEstimatedRowCount, double optimizerEstimatedCost) | public NoPutResultSet | getScrollInsensitiveResultSet(NoPutResultSet source, Activation activation, int resultSetNumber, int sourceRowWidth, boolean scrollable, double optimizerEstimatedRowCount, double optimizerEstimatedCost) | public NoPutResultSet | getSetOpResultSet(NoPutResultSet leftSource, NoPutResultSet rightSource, Activation activation, int resultSetNumber, long optimizerEstimatedRowCount, double optimizerEstimatedCost, int opType, boolean all, int intermediateOrderByColumnsSavedObject, int intermediateOrderByDirectionSavedObject) | public ResultSet | getSetTransactionResultSet(Activation activation) | public NoPutResultSet | getSortResultSet(NoPutResultSet source, boolean distinct, boolean isInSortedOrder, int orderItem, GeneratedMethod rowAllocator, int maxRowSize, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost) | public NoPutResultSet | getTableScanResultSet(Activation activation, long conglomId, int scociItem, GeneratedMethod resultRowAllocator, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchOperator, boolean sameStartStopPosition, Qualifier[][] qualifiers, String tableName, String userSuppliedOptimizerOverrides, String indexName, boolean isConstraint, boolean forUpdate, int colRefItem, int indexColItem, int lockMode, boolean tableLocked, int isolationLevel, boolean oneRowScan, double optimizerEstimatedRowCount, double optimizerEstimatedCost) a minimal table scan generator, for ease of use at present. | public NoPutResultSet | getUnionResultSet(NoPutResultSet leftResultSet, NoPutResultSet rightResultSet, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost) a minimal union scan generator, for ease of use at present. | public ResultSet | getUpdateResultSet(NoPutResultSet source, GeneratedMethod checkGM) | public ResultSet | getUpdateVTIResultSet(NoPutResultSet source) | public NoPutResultSet | getVTIResultSet(Activation activation, GeneratedMethod row, int resultSetNumber, GeneratedMethod constructor, String javaClassName, Qualifier[][] pushedQualifiers, int erdNumber, boolean version2, boolean reuseablePs, int ctcNumber, boolean isTarget, int scanIsolationLevel, double optimizerEstimatedRowCount, double optimizerEstimatedCost) |
GenericResultSetFactory | public GenericResultSetFactory()(Code) | | |
getBulkTableScanResultSet | public NoPutResultSet getBulkTableScanResultSet(Activation activation, long conglomId, int scociItem, GeneratedMethod resultRowAllocator, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchOperator, boolean sameStartStopPosition, Qualifier[][] qualifiers, String tableName, String userSuppliedOptimizerOverrides, String indexName, boolean isConstraint, boolean forUpdate, int colRefItem, int indexColItem, int lockMode, boolean tableLocked, int isolationLevel, int rowsPerRead, boolean oneRowScan, double optimizerEstimatedRowCount, double optimizerEstimatedCost) throws StandardException(Code) | | Table/Index scan where rows are read in bulk
See Also: ResultSetFactory.getBulkTableScanResultSet exception: StandardException - thrown on error |
getDistinctScanResultSet | public NoPutResultSet getDistinctScanResultSet(Activation activation, long conglomId, int scociItem, GeneratedMethod resultRowAllocator, int resultSetNumber, int hashKeyColumn, String tableName, String userSuppliedOptimizerOverrides, String indexName, boolean isConstraint, int colRefItem, int lockMode, boolean tableLocked, int isolationLevel, double optimizerEstimatedRowCount, double optimizerEstimatedCost) throws StandardException(Code) | | a distinct scan generator, for ease of use at present.
See Also: ResultSetFactory.getHashScanResultSet exception: StandardException - thrown on error |
getHashJoinResultSet | public NoPutResultSet getHashJoinResultSet(NoPutResultSet leftResultSet, int leftNumCols, NoPutResultSet rightResultSet, int rightNumCols, GeneratedMethod joinClause, int resultSetNumber, boolean oneRowRightSide, boolean notExistsRightSide, double optimizerEstimatedRowCount, double optimizerEstimatedCost, String userSuppliedOptimizerOverrides) throws StandardException(Code) | | See Also: ResultSetFactory.getHashJoinResultSet exception: StandardException - thrown on error |
getHashLeftOuterJoinResultSet | public NoPutResultSet getHashLeftOuterJoinResultSet(NoPutResultSet leftResultSet, int leftNumCols, NoPutResultSet rightResultSet, int rightNumCols, GeneratedMethod joinClause, int resultSetNumber, GeneratedMethod emptyRowFun, boolean wasRightOuterJoin, boolean oneRowRightSide, boolean notExistsRightSide, double optimizerEstimatedRowCount, double optimizerEstimatedCost, String userSuppliedOptimizerOverrides) throws StandardException(Code) | | See Also: ResultSetFactory.getHashLeftOuterJoinResultSet exception: StandardException - thrown on error |
getHashScanResultSet | public NoPutResultSet getHashScanResultSet(Activation activation, long conglomId, int scociItem, GeneratedMethod resultRowAllocator, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchOperator, boolean sameStartStopPosition, Qualifier[][] scanQualifiers, Qualifier[][] nextQualifiers, int initialCapacity, float loadFactor, int maxCapacity, int hashKeyColumn, String tableName, String userSuppliedOptimizerOverrides, String indexName, boolean isConstraint, boolean forUpdate, int colRefItem, int indexColItem, int lockMode, boolean tableLocked, int isolationLevel, double optimizerEstimatedRowCount, double optimizerEstimatedCost) throws StandardException(Code) | | a hash scan generator, for ease of use at present.
See Also: ResultSetFactory.getHashScanResultSet exception: StandardException - thrown on error |
getHashTableResultSet | public NoPutResultSet getHashTableResultSet(NoPutResultSet source, GeneratedMethod singleTableRestriction, Qualifier[][] equijoinQualifiers, GeneratedMethod projection, int resultSetNumber, int mapRefItem, boolean reuseResult, int keyColItem, boolean removeDuplicates, long maxInMemoryRowCount, int initialCapacity, float loadFactor, double optimizerEstimatedRowCount, double optimizerEstimatedCost) throws StandardException(Code) | | See Also: ResultSetFactory.getHashTableResultSet exception: StandardException - thrown on error |
getIndexRowToBaseRowResultSet | public NoPutResultSet getIndexRowToBaseRowResultSet(long conglomId, int scociItem, NoPutResultSet source, GeneratedMethod resultRowAllocator, int resultSetNumber, String indexName, int heapColRefItem, int indexColRefItem, int indexColMapItem, GeneratedMethod restriction, boolean forUpdate, double optimizerEstimatedRowCount, double optimizerEstimatedCost) throws StandardException(Code) | | See Also: ResultSetFactory.getIndexRowToBaseRowResultSet exception: StandardException - Thrown on error |
getLastIndexKeyResultSet | public NoPutResultSet getLastIndexKeyResultSet(Activation activation, int resultSetNumber, GeneratedMethod resultRowAllocator, long conglomId, String tableName, String userSuppliedOptimizerOverrides, String indexName, int colRefItem, int lockMode, boolean tableLocked, int isolationLevel, double optimizerEstimatedRowCount, double optimizerEstimatedCost) throws StandardException(Code) | | A last index key sresult set returns the last row from
the index in question. It is used as an ajunct to max().
Parameters: activation - the activation for this result set,which provides the context for the row allocation operation. Parameters: resultSetNumber - The resultSetNumber for the ResultSet Parameters: resultRowAllocator - a reference to a method in the activationthat creates a holder for the result row of the scan. Maybe a partial row. ExecRow rowAllocator() throws StandardException; Parameters: conglomId - the conglomerate of the table to be scanned. Parameters: tableName - The full name of the table Parameters: userSuppliedOptimizerOverrides - Overrides specified by the user on the sql Parameters: indexName - The name of the index, if one used to access table. Parameters: colRefItem - An saved item for a bitSet of columns thatare referenced in the underlying table. -1 ifno item. Parameters: lockMode - The lock granularity to use (seeTransactionController in access) Parameters: tableLocked - Whether or not the table is marked as using table locking(in sys.systables) Parameters: isolationLevel - Isolation level (specified or not) to use on scans Parameters: optimizerEstimatedRowCount - Estimated total # of rows byoptimizer Parameters: optimizerEstimatedCost - Estimated total cost by optimizer the scan operation as a result set. exception: StandardException - thrown when unable to create theresult set |
getNestedLoopJoinResultSet | public NoPutResultSet getNestedLoopJoinResultSet(NoPutResultSet leftResultSet, int leftNumCols, NoPutResultSet rightResultSet, int rightNumCols, GeneratedMethod joinClause, int resultSetNumber, boolean oneRowRightSide, boolean notExistsRightSide, double optimizerEstimatedRowCount, double optimizerEstimatedCost, String userSuppliedOptimizerOverrides) throws StandardException(Code) | | See Also: ResultSetFactory.getNestedLoopJoinResultSet exception: StandardException - thrown on error |
getNestedLoopLeftOuterJoinResultSet | public NoPutResultSet getNestedLoopLeftOuterJoinResultSet(NoPutResultSet leftResultSet, int leftNumCols, NoPutResultSet rightResultSet, int rightNumCols, GeneratedMethod joinClause, int resultSetNumber, GeneratedMethod emptyRowFun, boolean wasRightOuterJoin, boolean oneRowRightSide, boolean notExistsRightSide, double optimizerEstimatedRowCount, double optimizerEstimatedCost, String userSuppliedOptimizerOverrides) throws StandardException(Code) | | See Also: ResultSetFactory.getNestedLoopLeftOuterJoinResultSet exception: StandardException - thrown on error |
getRaDependentTableScanResultSet | public NoPutResultSet getRaDependentTableScanResultSet(Activation activation, long conglomId, int scociItem, GeneratedMethod resultRowAllocator, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchOperator, boolean sameStartStopPosition, Qualifier[][] qualifiers, String tableName, String userSuppliedOptimizerOverrides, String indexName, boolean isConstraint, boolean forUpdate, int colRefItem, int indexColItem, int lockMode, boolean tableLocked, int isolationLevel, boolean oneRowScan, double optimizerEstimatedRowCount, double optimizerEstimatedCost, String parentResultSetId, long fkIndexConglomId, int fkColArrayItem, int rltItem) throws StandardException(Code) | | a referential action dependent table scan generator.
See Also: ResultSetFactory.getTableScanResultSet exception: StandardException - thrown on error |
getTableScanResultSet | public NoPutResultSet getTableScanResultSet(Activation activation, long conglomId, int scociItem, GeneratedMethod resultRowAllocator, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchOperator, boolean sameStartStopPosition, Qualifier[][] qualifiers, String tableName, String userSuppliedOptimizerOverrides, String indexName, boolean isConstraint, boolean forUpdate, int colRefItem, int indexColItem, int lockMode, boolean tableLocked, int isolationLevel, boolean oneRowScan, double optimizerEstimatedRowCount, double optimizerEstimatedCost) throws StandardException(Code) | | a minimal table scan generator, for ease of use at present.
See Also: ResultSetFactory.getTableScanResultSet exception: StandardException - thrown on error |
getVTIResultSet | public NoPutResultSet getVTIResultSet(Activation activation, GeneratedMethod row, int resultSetNumber, GeneratedMethod constructor, String javaClassName, Qualifier[][] pushedQualifiers, int erdNumber, boolean version2, boolean reuseablePs, int ctcNumber, boolean isTarget, int scanIsolationLevel, double optimizerEstimatedRowCount, double optimizerEstimatedCost) throws StandardException(Code) | | See Also: ResultSetFactory.getVTIResultSet exception: StandardException - thrown on error |
|
|