Interface NoPutResultSet
-
- All Superinterfaces:
ResultSet,RowLocationRetRowSource,RowSource
- All Known Implementing Classes:
AnyResultSet,BasicNoPutResultSetImpl,BulkTableScanResultSet,CurrentOfResultSet,DependentResultSet,DistinctGroupedAggregateResultSet,DistinctScalarAggregateResultSet,DistinctScanResultSet,GenericAggregateResultSet,GroupedAggregateResultSet,HashJoinResultSet,HashLeftOuterJoinResultSet,HashScanResultSet,HashTableResultSet,IndexRowToBaseRowResultSet,JoinResultSet,LastIndexKeyResultSet,MaterializedResultSet,MergeJoinResultSet,MultiProbeTableScanResultSet,NestedLoopJoinResultSet,NestedLoopLeftOuterJoinResultSet,NoPutResultSetImpl,NormalizeResultSet,OnceResultSet,ProjectRestrictResultSet,RowCountResultSet,RowResultSet,ScalarAggregateResultSet,ScanResultSet,ScrollInsensitiveResultSet,SetOpResultSet,SortResultSet,TableScanResultSet,TemporaryRowHolderResultSet,UnionResultSet,ValidateCheckConstraintResultSet,VTIResultSet,WindowResultSet
public interface NoPutResultSet extends ResultSet, RowLocationRetRowSource
The NoPutResultSet interface is used to provide additional operations on result sets that can be used in returning rows up a ResultSet tree.Since the ResulSet operations must also be supported by NoPutResultSets, we extend that interface here as well.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringABSOLUTEstatic java.lang.StringFIRSTstatic java.lang.StringLASTstatic java.lang.StringNEXTstatic java.lang.StringPREVIOUSstatic java.lang.StringRELATIVEstatic intTEMPORARY_RESULT_SET_NUMBER-
Fields inherited from interface org.apache.derby.iapi.sql.ResultSet
CURRENT_RESULTSET_ONLY, ENTIRE_RESULTSET_TREE, ISAFTERLAST, ISBEFOREFIRST, ISFIRST, ISLAST
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description doublegetEstimatedRowCount()Get the estimated row count from this result set.ExecRowgetNextRowCore()Return the requested values computed from the next row (if any) for which the restriction evaluates to true.intgetPointOfAttachment()Return the point of attachment for this subquery.intgetScanIsolationLevel()Return the isolation level of the scan in the result set.booleanisForUpdate()Is this ResultSet or it's source result set for updatevoidmarkAsTopResultSet()Mark the ResultSet as the topmost one in the ResultSet tree.voidmarkRowAsDeleted()Marks the resultSet's currentRow as deleted after a delete has been issued by either by using positioned delete or JDBC's deleteRow method.voidopenCore()open a scan on the table. scan parameters are evaluated at each open, so there is probably some way of altering their values...voidpositionScanAtRowLocation(RowLocation rLoc)Positions the cursor in the specified rowLocation.voidreopenCore()reopen the scan.booleanrequiresRelocking()Do we need to relock the row when going to the heap.intresultSetNumber()Get the number of this ResultSet, which is guaranteed to be unique within a statement.voidsetCurrentRow(ExecRow row)Set the current row to the row passed in.voidsetHasDeferrableChecks()Set that we are acting on behalf of an insert result set that has deferrable check constraintsvoidsetNeedsRowLocation(boolean needsRowLocation)Set whether or not the NPRS need the row location when acting as a row source.voidsetTargetResultSet(TargetResultSet trs)Notify a NPRS that it is the source for the specified TargetResultSet.voidupdateRow(ExecRow row, RowChanger rowChanger)Updates the resultSet's current row with it's new values after an update has been issued either using positioned update or JDBC's udpateRow method.-
Methods inherited from interface org.apache.derby.iapi.sql.ResultSet
addWarning, checkRowPosition, cleanUp, clearCurrentRow, close, finish, getAbsoluteRow, getActivation, getAutoGeneratedKeysResultset, getBeginExecutionTimestamp, getCursorName, getEndExecutionTimestamp, getExecuteTime, getFirstRow, getLastRow, getNextRow, getPreviousRow, getRelativeRow, getResultDescription, getRowNumber, getSubqueryTrackingArray, getTimeSpent, getWarnings, isClosed, modifiedRowCount, open, returnsRows, setAfterLastRow, setBeforeFirstRow, toXML
-
Methods inherited from interface org.apache.derby.iapi.store.access.RowLocationRetRowSource
needsRowLocation, needsRowLocationForDeferredCheckConstraints, offendingRowLocation, rowLocation
-
Methods inherited from interface org.apache.derby.iapi.store.access.RowSource
closeRowSource, getNextRowFromRowSource, getValidColumns, needsToClone
-
-
-
-
Field Detail
-
ABSOLUTE
static final java.lang.String ABSOLUTE
- See Also:
- Constant Field Values
-
RELATIVE
static final java.lang.String RELATIVE
- See Also:
- Constant Field Values
-
FIRST
static final java.lang.String FIRST
- See Also:
- Constant Field Values
-
NEXT
static final java.lang.String NEXT
- See Also:
- Constant Field Values
-
LAST
static final java.lang.String LAST
- See Also:
- Constant Field Values
-
PREVIOUS
static final java.lang.String PREVIOUS
- See Also:
- Constant Field Values
-
TEMPORARY_RESULT_SET_NUMBER
static final int TEMPORARY_RESULT_SET_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
markAsTopResultSet
void markAsTopResultSet()
Mark the ResultSet as the topmost one in the ResultSet tree. Useful for closing down the ResultSet on an error.
-
openCore
void openCore() throws StandardExceptionopen a scan on the table. scan parameters are evaluated at each open, so there is probably some way of altering their values...openCore() can only be called on a closed result set. see reopenCore if you want to reuse an open result set.
For NoPutResultSet open() must only be called on the top ResultSet. Opening of NoPutResultSet's below the top result set are implemented by calling openCore.
- Throws:
StandardException- thrown if cursor finished.
-
reopenCore
void reopenCore() throws StandardExceptionreopen the scan. behaves like openCore() but is optimized where appropriate (e.g. where scanController has special logic for us).used by joiners
scan parameters are evaluated at each open, so there is probably some way of altering their values...
- Throws:
StandardException- thrown if cursor finished.
-
getNextRowCore
ExecRow getNextRowCore() throws StandardException
Return the requested values computed from the next row (if any) for which the restriction evaluates to true.restriction and projection parameters are evaluated for each row.
- Returns:
- the next row in the result
- Throws:
StandardException- thrown on failure.
-
getPointOfAttachment
int getPointOfAttachment()
Return the point of attachment for this subquery. (Only meaningful for Any and Once ResultSets, which can and will only be at the top of a ResultSet for a subquery.)- Returns:
- int Point of attachment (result set number) for this subquery. (-1 if not a subquery - also Sanity violation)
-
getScanIsolationLevel
int getScanIsolationLevel()
Return the isolation level of the scan in the result set. Only expected to be called for those ResultSets that contain a scan.- Returns:
- The isolation level of the scan (in TransactionController constants).
-
setTargetResultSet
void setTargetResultSet(TargetResultSet trs)
Notify a NPRS that it is the source for the specified TargetResultSet. This is useful when doing bulk insert.- Parameters:
trs- The TargetResultSet.
-
setNeedsRowLocation
void setNeedsRowLocation(boolean needsRowLocation)
Set whether or not the NPRS need the row location when acting as a row source. (The target result set determines this.)
-
setHasDeferrableChecks
void setHasDeferrableChecks()
Set that we are acting on behalf of an insert result set that has deferrable check constraints
-
getEstimatedRowCount
double getEstimatedRowCount()
Get the estimated row count from this result set.- Returns:
- The estimated row count (as a double) from this result set.
-
resultSetNumber
int resultSetNumber()
Get the number of this ResultSet, which is guaranteed to be unique within a statement.
-
setCurrentRow
void setCurrentRow(ExecRow row)
Set the current row to the row passed in.- Parameters:
row- the new current row
-
requiresRelocking
boolean requiresRelocking()
Do we need to relock the row when going to the heap.- Returns:
- Whether or not we need to relock the row when going to the heap.
-
isForUpdate
boolean isForUpdate()
Is this ResultSet or it's source result set for update- Returns:
- Whether or not the result set is for update.
-
updateRow
void updateRow(ExecRow row, RowChanger rowChanger) throws StandardException
Updates the resultSet's current row with it's new values after an update has been issued either using positioned update or JDBC's udpateRow method.- Parameters:
row- new values for the currentRowrowChanger- holds information about row: what columns of it is to be used for updating, and what underlying base table column each such column corresponds to.- Throws:
StandardException- thrown on failure.
-
markRowAsDeleted
void markRowAsDeleted() throws StandardExceptionMarks the resultSet's currentRow as deleted after a delete has been issued by either by using positioned delete or JDBC's deleteRow method.- Throws:
StandardException- thrown on failure.
-
positionScanAtRowLocation
void positionScanAtRowLocation(RowLocation rLoc) throws StandardException
Positions the cursor in the specified rowLocation. Used for scrollable insensitive result sets in order to position the cursor back to a row that has already be visited.- Parameters:
rLoc- row location of the current cursor row- Throws:
StandardException- thrown on failure to get location from storage engine
-
-