Top Description Fields Methods
org.apache.derby.iapi.sql.execute

public Interface NoPutResultSet

extends ResultSet, RowLocationRetRowSource
Known Direct Implementers
org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl, org.apache.derby.impl.sql.execute.TemporaryRowHolderResultSet
Imports
org.apache.derby.iapi.sql.ResultSet, org.apache.derby.shared.common.error.StandardException, org.apache.derby.iapi.sql.execute.RowChanger, org.apache.derby.iapi.types.RowLocation, org.apache.derby.iapi.store.access.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

Modifier and TypeField and Description
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final int
Inherited from org.apache.derby.iapi.sql.ResultSet:
CURRENT_RESULTSET_ONLYENTIRE_RESULTSET_TREEISAFTERLASTISBEFOREFIRSTISFIRSTISLAST

Method Summary

Modifier and TypeMethod and Description
public double

Returns:

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

Get the estimated row count from this result set.

public ExecRow

Returns:

the next row in the result
getNextRowCore
()

Return the requested values computed from the next row (if any) for which the restriction evaluates to true.

public int

Returns:

int Point of attachment (result set number) for this subquery. (-1 if not a subquery - also Sanity violation)
getPointOfAttachment
()

Return the point of attachment for this subquery.

public int

Returns:

The isolation level of the scan (in TransactionController constants).
getScanIsolationLevel
()

Return the isolation level of the scan in the result set.

public boolean

Returns:

Whether or not the result set is for update.
isForUpdate
()

Is this ResultSet or it's source result set for update

public void
markAsTopResultSet()

Mark the ResultSet as the topmost one in the ResultSet tree.

public void
markRowAsDeleted()

Marks the resultSet's currentRow as deleted after a delete has been issued by either by using positioned delete or JDBC's deleteRow method.

public void
openCore()

open a scan on the table.

public void
positionScanAtRowLocation(RowLocation
row location of the current cursor row
rLoc
)

Positions the cursor in the specified rowLocation.

public void
reopenCore()

reopen the scan.

public boolean

Returns:

Whether or not we need to relock the row when going to the heap.
requiresRelocking
()

Do we need to relock the row when going to the heap.

public int
resultSetNumber()

Get the number of this ResultSet, which is guaranteed to be unique within a statement.

public void
setCurrentRow(ExecRow
the new current row
row
)

Set the current row to the row passed in.

public void
setHasDeferrableChecks()

Set that we are acting on behalf of an insert result set that has deferrable check constraints

public void
setNeedsRowLocation(boolean needsRowLocation)

Set whether or not the NPRS need the row location when acting as a row source.

public void
setTargetResultSet(TargetResultSet
The TargetResultSet.
trs
)

Notify a NPRS that it is the source for the specified TargetResultSet.

public void
updateRow(ExecRow
new values for the currentRow
row
,
RowChanger
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.
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.

Inherited from org.apache.derby.iapi.sql.ResultSet:
addWarningcheckRowPositioncleanUpclearCurrentRowclosefinishgetAbsoluteRowgetActivationgetAutoGeneratedKeysResultsetgetBeginExecutionTimestampgetCursorNamegetEndExecutionTimestampgetExecuteTimegetFirstRowgetLastRowgetNextRowgetPreviousRowgetRelativeRowgetResultDescriptiongetRowNumbergetSubqueryTrackingArraygetTimeSpentgetWarningsisClosedmodifiedRowCountopenreturnsRowssetAfterLastRowsetBeforeFirstRowtoXML
Inherited from org.apache.derby.iapi.store.access.RowLocationRetRowSource:
needsRowLocationneedsRowLocationForDeferredCheckConstraintsoffendingRowLocationrowLocation

Field Detail

ABSOLUTEback to summary
public static final String ABSOLUTE
FIRSTback to summary
public static final String FIRST
LASTback to summary
public static final String LAST
NEXTback to summary
public static final String NEXT
PREVIOUSback to summary
public static final String PREVIOUS
RELATIVEback to summary
public static final String RELATIVE
TEMPORARY_RESULT_SET_NUMBERback to summary
public static final int TEMPORARY_RESULT_SET_NUMBER

Method Detail

getEstimatedRowCountback to summary
public double getEstimatedRowCount()

Get the estimated row count from this result set.

Returns:double

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

getNextRowCoreback to summary
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:ExecRow

the next row in the result

Exceptions
StandardException:
thrown on failure.
getPointOfAttachmentback to summary
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

int Point of attachment (result set number) for this subquery. (-1 if not a subquery - also Sanity violation)

getScanIsolationLevelback to summary
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:int

The isolation level of the scan (in TransactionController constants).

isForUpdateback to summary
public boolean isForUpdate()

Is this ResultSet or it's source result set for update

Returns:boolean

Whether or not the result set is for update.

markAsTopResultSetback to summary
public void markAsTopResultSet()

Mark the ResultSet as the topmost one in the ResultSet tree. Useful for closing down the ResultSet on an error.

markRowAsDeletedback to summary
public void markRowAsDeleted() throws StandardException

Marks the resultSet's currentRow as deleted after a delete has been issued by either by using positioned delete or JDBC's deleteRow method.

Exceptions
StandardException:
thrown on failure.
openCoreback to summary
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.

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.

Exceptions
StandardException:
thrown if cursor finished.
positionScanAtRowLocationback to summary
public 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:RowLocation

row location of the current cursor row

Exceptions
StandardException:
thrown on failure to get location from storage engine
reopenCoreback to summary
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...

Exceptions
StandardException:
thrown if cursor finished.
requiresRelockingback to summary
public boolean requiresRelocking()

Do we need to relock the row when going to the heap.

Returns:boolean

Whether or not we need to relock the row when going to the heap.

resultSetNumberback to summary
public int resultSetNumber()

Get the number of this ResultSet, which is guaranteed to be unique within a statement.

setCurrentRowback to summary
public void setCurrentRow(ExecRow row)

Set the current row to the row passed in.

Parameters
row:ExecRow

the new current row

setHasDeferrableChecksback to summary
public void setHasDeferrableChecks()

Set that we are acting on behalf of an insert result set that has deferrable check constraints

setNeedsRowLocationback to summary
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.)

setTargetResultSetback to summary
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:TargetResultSet

The TargetResultSet.

updateRowback to summary
public 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:ExecRow

new values for the currentRow

rowChanger:RowChanger

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.

Exceptions
StandardException:
thrown on failure.