org.apache.derby.iapi.sql.execute
Interface NoPutResultSet

All Superinterfaces:
ResultSet, RowLocationRetRowSource, RowSource
All Known Implementing Classes:
BasicNoPutResultSetImpl, TemporaryRowHolderResultSet

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.

Author:
jerry

Field Summary
static java.lang.String ABSOLUTE
           
static java.lang.String FIRST
           
static java.lang.String LAST
           
static java.lang.String NEXT
           
static java.lang.String PREVIOUS
           
static java.lang.String RELATIVE
           
 
Fields inherited from interface org.apache.derby.iapi.sql.ResultSet
CURRENT_RESULTSET_ONLY, ENTIRE_RESULTSET_TREE, ISAFTERLAST, ISBEFOREFIRST, ISFIRST, ISLAST
 
Method Summary
 void clearCurrentRow()
          Clear the current row
 double getEstimatedRowCount()
          Get the estimated row count from this result set.
 ExecRow getNextRowCore()
          Return the requested values computed from the next row (if any) for which the restriction evaluates to true.
 int getPointOfAttachment()
          Return the point of attachment for this subquery.
 int getScanIsolationLevel()
          Return the isolation level of the scan in the result set.
 boolean isForUpdate()
          Is this ResultSet or it's source result set for update
 void markAsTopResultSet()
          Mark the ResultSet as the topmost one in the ResultSet tree.
 void openCore()
          open a scan on the table. scan parameters are evaluated at each open, so there is probably some way of altering their values...
 void reopenCore()
          reopen the scan.
 boolean requiresRelocking()
          Do we need to relock the row when going to the heap.
 int resultSetNumber()
          Get the number of this ResultSet, which is guaranteed to be unique within a statement.
 void setCurrentRow(ExecRow row)
          Set the current row to the row passed in.
 void setNeedsRowLocation(boolean needsRowLocation)
          Set whether or not the NPRS need the row location when acting as a row source.
 void setTargetResultSet(TargetResultSet trs)
          Notify a NPRS that it is the source for the specified TargetResultSet.
 
Methods inherited from interface org.apache.derby.iapi.sql.ResultSet
checkRowPosition, cleanUp, close, finish, getAbsoluteRow, getAutoGeneratedKeysResultset, getBeginExecutionTimestamp, getCursorName, getEndExecutionTimestamp, getExecuteTime, getFirstRow, getLastRow, getNextRow, getPreviousRow, getRelativeRow, getResultDescription, getRowNumber, getSubqueryTrackingArray, getTimeSpent, getWarnings, isClosed, modifiedRowCount, open, returnsRows, setAfterLastRow, setBeforeFirstRow
 
Methods inherited from interface org.apache.derby.iapi.store.access.RowLocationRetRowSource
needsRowLocation, rowLocation
 
Methods inherited from interface org.apache.derby.iapi.store.access.RowSource
closeRowSource, getNextRowFromRowSource, getValidColumns, needsToClone
 

Field Detail

ABSOLUTE

public static final java.lang.String ABSOLUTE
See Also:
Constant Field Values

RELATIVE

public static final java.lang.String RELATIVE
See Also:
Constant Field Values

FIRST

public static final java.lang.String FIRST
See Also:
Constant Field Values

NEXT

public static final java.lang.String NEXT
See Also:
Constant Field Values

LAST

public static final java.lang.String LAST
See Also:
Constant Field Values

PREVIOUS

public static final java.lang.String PREVIOUS
See Also:
Constant Field Values
Method Detail

markAsTopResultSet

public void markAsTopResultSet()
Mark the ResultSet as the topmost one in the ResultSet tree. Useful for closing down the ResultSet on an error.

Returns:
Nothing.

openCore

public void openCore()
              throws StandardException
open 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.

Throws:
StandardException - thrown if cursor finished.

reopenCore

public void reopenCore()
                throws StandardException
reopen 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

public 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

public 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

public 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

public 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.
Returns:
Nothing.

setNeedsRowLocation

public 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.)

Returns:
Nothing.

getEstimatedRowCount

public double getEstimatedRowCount()
Get the estimated row count from this result set.

Returns:
The estimated row count (as a double) from this result set.

resultSetNumber

public int resultSetNumber()
Get the number of this ResultSet, which is guaranteed to be unique within a statement.


setCurrentRow

public void setCurrentRow(ExecRow row)
Set the current row to the row passed in.

Parameters:
row - the new current row

clearCurrentRow

public void clearCurrentRow()
Clear the current row


requiresRelocking

public 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

public boolean isForUpdate()
Is this ResultSet or it's source result set for update

Returns:
Whether or not the result set is for update.

Built on Tue 2006-10-10 19:23:47+0200, from revision exported

Apache Derby V10.1 Engine Documentation - Copyright © 1997,2005 The Apache Software Foundation or its licensors, as applicable.