CursorResultSet
, NoPutResultSet
, ResultSet
, RowLocationRetRowSource
, RowSource
class CurrentOfResultSet extends NoPutResultSetImpl implements CursorResultSet
This result set returns only one row.
BasicNoPutResultSetImpl.FieldComparator
Modifier and Type | Field | Description |
---|---|---|
private CursorResultSet |
cursor |
|
private java.lang.String |
cursorName |
|
private boolean |
next |
|
private RowLocation |
rowLocation |
|
private ExecRow |
sparseRow |
|
private CursorResultSet |
target |
activation, beginTime, closeTime, compactRow, constructorTime, currentRow, endExecutionTime, finished, isOpen, isTopResultSet, nextTime, numOpens, openTime, optimizerEstimatedCost, optimizerEstimatedRowCount, resultDescription, rowsFiltered, rowsSeen, startExecutionTime, subqueryTrackingArray
ABSOLUTE, FIRST, LAST, NEXT, PREVIOUS, RELATIVE, TEMPORARY_RESULT_SET_NUMBER
checkNullCols, clonedExecRow, cncLen, resultSetNumber, targetResultSet
CURRENT_RESULTSET_ONLY, ENTIRE_RESULTSET_TREE, ISAFTERLAST, ISBEFOREFIRST, ISFIRST, ISLAST
Constructor | Description |
---|---|
CurrentOfResultSet(java.lang.String cursorName,
Activation activation,
int resultSetNumber) |
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
If the result set has been opened,
close the open scan.
|
void |
finish() |
Tells the system that there will be no more access
to any database information via this result set;
in particular, no more calls to open().
|
ExecRow |
getCurrentRow() |
Returns the current row of the result set.
|
private void |
getCursor() |
Because the positioned operation only gets one location
per execution, and the cursor could be completely different
for each execution (closed and reopened, perhaps), we
determine where caching the cursor could be applied.
|
ExecRow |
getNextRowCore() |
If open and not returned yet, returns the row.
|
RowLocation |
getRowLocation() |
This result set has its row location from
the last fetch done.
|
private ExecRow |
getSparseRow(ExecRow row,
int[] indexCols) |
Return a sparse heap row, based on a compact index row.
|
long |
getTimeSpent(int type) |
Return the total amount of time spent in this ResultSet
|
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.
|
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 |
updateRow(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.
|
addWarning, attachStatementContext, checkCancellationFlag, checkRowPosition, childrenToXML, cleanUp, dumpTimeStats, finishAndRTS, getAbsoluteRow, getActivation, getAutoGeneratedKeysResultset, getBeginExecutionTimestamp, getCompactRow, getCurrentTimeMillis, getElapsedMillis, getEndExecutionTimestamp, getEstimatedRowCount, getExecuteTime, getExecutionFactory, getFirstRow, getLanguageConnectionContext, getLastRow, getNextRow, getPointOfAttachment, getPreviousRow, getRelativeRow, getRowNumber, getScanIsolationLevel, getSubqueryTrackingArray, getTransactionController, getWarnings, isClosed, isXplainOnlyMode, markAsTopResultSet, modifiedRowCount, open, recordConstructorTime, reopenCore, requiresRelocking, returnsRows, setAfterLastRow, setBeforeFirstRow, setCompactRow, setCompatRow, toXML, toXML
clearCurrentRow, clearOrderableCache, closeRowSource, getCursorName, getNextRowFromRowSource, getResultDescription, getValidColumns, isForUpdate, needsRowLocation, needsRowLocationForDeferredCheckConstraints, needsToClone, offendingRowLocation, positionScanAtRowLocation, printQualifiers, resultSetNumber, rowLocation, setCurrentRow, setHasDeferrableChecks, setNeedsRowLocation, setTargetResultSet, skipRow, skipScan, unpackHashValue
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addWarning, checkRowPosition, cleanUp, clearCurrentRow, getAbsoluteRow, getActivation, getAutoGeneratedKeysResultset, getBeginExecutionTimestamp, getCursorName, getEndExecutionTimestamp, getExecuteTime, getFirstRow, getLastRow, getNextRow, getPreviousRow, getRelativeRow, getResultDescription, getRowNumber, getSubqueryTrackingArray, getWarnings, isClosed, modifiedRowCount, open, returnsRows, setAfterLastRow, setBeforeFirstRow, toXML
private boolean next
private RowLocation rowLocation
private CursorResultSet cursor
private CursorResultSet target
private ExecRow sparseRow
private final java.lang.String cursorName
CurrentOfResultSet(java.lang.String cursorName, Activation activation, int resultSetNumber)
public void openCore() throws StandardException
openCore
in interface NoPutResultSet
StandardException
- thrown on failure to openpublic ExecRow getNextRowCore() throws StandardException
getNextRowCore
in interface NoPutResultSet
getNextRowCore
in class BasicNoPutResultSetImpl
StandardException
- thrown on failure.NoPutResultSet.getNextRowCore()
private ExecRow getSparseRow(ExecRow row, int[] indexCols) throws StandardException
row
- compact referenced index rowindexCols
- base column positions of index keys, signed with asc/desc infoStandardException
public void close() throws StandardException
close
in interface ResultSet
close
in class NoPutResultSetImpl
StandardException
- thrown on errorpublic void finish() throws StandardException
ResultSet
finish
in interface ResultSet
finish
in class BasicNoPutResultSetImpl
StandardException
- on errorpublic long getTimeSpent(int type)
getTimeSpent
in interface ResultSet
type
- CURRENT_RESULTSET_ONLY - time spent only in this ResultSet
ENTIRE_RESULTSET_TREE - time spent in this ResultSet and below.public RowLocation getRowLocation()
getRowLocation
in interface CursorResultSet
StandardException
- thrown on failure to get row locationCursorResultSet
public ExecRow getCurrentRow()
CursorResultSet
getCurrentRow
in interface CursorResultSet
CursorResultSet
private void getCursor() throws StandardException
When cached, we check if the cursor was closed'd, and if so, throw it out and see if there's one in the cache with our name.
StandardException
public void updateRow(ExecRow row, RowChanger rowChanger) throws StandardException
NoPutResultSet
updateRow
in interface NoPutResultSet
updateRow
in class NoPutResultSetImpl
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.StandardException
- thrown on failure.NoPutResultSet.updateRow(org.apache.derby.iapi.sql.execute.ExecRow, org.apache.derby.iapi.sql.execute.RowChanger)
public void markRowAsDeleted() throws StandardException
NoPutResultSet
markRowAsDeleted
in interface NoPutResultSet
markRowAsDeleted
in class NoPutResultSetImpl
StandardException
- thrown on failure.NoPutResultSet.markRowAsDeleted()
Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.