NoPutResultSet, ResultSet, RowLocationRetRowSource, RowSourceAnyResultSet, CurrentOfResultSet, GenericAggregateResultSet, HashTableResultSet, IndexRowToBaseRowResultSet, JoinResultSet, MaterializedResultSet, NormalizeResultSet, OnceResultSet, ProjectRestrictResultSet, RowCountResultSet, RowResultSet, ScanResultSet, ScrollInsensitiveResultSet, SetOpResultSet, SortResultSet, UnionResultSet, VTIResultSet, WindowResultSetabstract class NoPutResultSetImpl extends BasicNoPutResultSetImpl
This abstract class does not define the entire ResultSet interface, but leaves the 'get' half of the interface for subtypes to implement. It is package-visible only, with its methods being public for exposure by its subtypes.
BasicNoPutResultSetImpl.FieldComparator| Modifier and Type | Field | Description |
|---|---|---|
protected int[] |
checkNullCols |
|
protected ExecRow |
clonedExecRow |
|
protected int |
cncLen |
|
private boolean |
needsRowLocation |
|
private boolean |
needsRowLocationForDeferredCheckConstraints |
|
int |
resultSetNumber |
|
protected TargetResultSet |
targetResultSet |
activation, beginTime, closeTime, compactRow, constructorTime, currentRow, endExecutionTime, finished, isOpen, isTopResultSet, nextTime, numOpens, openTime, optimizerEstimatedCost, optimizerEstimatedRowCount, resultDescription, rowsFiltered, rowsSeen, startExecutionTime, subqueryTrackingArrayABSOLUTE, FIRST, LAST, NEXT, PREVIOUS, RELATIVE, TEMPORARY_RESULT_SET_NUMBERCURRENT_RESULTSET_ONLY, ENTIRE_RESULTSET_TREE, ISAFTERLAST, ISBEFOREFIRST, ISFIRST, ISLAST| Constructor | Description |
|---|---|
NoPutResultSetImpl(Activation activation,
int resultSetNumber,
double optimizerEstimatedRowCount,
double optimizerEstimatedCost) |
Constructor
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
clearCurrentRow() |
Clear the current row
|
protected void |
clearOrderableCache(Qualifier[][] qualifiers) |
Clear the Orderable cache for each qualifier.
|
void |
close() |
Close needs to invalidate any dependent statements, if this is a cursor.
|
void |
closeRowSource() |
closeRowSource tells the RowSource that it will no longer need to
return any rows and it can release any resource it may have.
|
java.lang.String |
getCursorName() |
Return my cursor name for JDBC.
|
DataValueDescriptor[] |
getNextRowFromRowSource() |
Get the next row as an array of column objects.
|
ResultDescription |
getResultDescription() |
Returns the description of the table's rows
|
FormatableBitSet |
getValidColumns() |
getValidColumns describes the DataValueDescriptor[] returned by all calls
to the getNextRowFromRowSource() call.
|
boolean |
isForUpdate() |
Is this ResultSet or it's source result set for update
This method will be overriden in the inherited Classes
if it is true
|
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.
|
boolean |
needsRowLocation() |
needsRowLocation returns true iff this the row source expects the
drainer of the row source to call rowLocation after getting a row from
getNextRowFromRowSource.
|
boolean |
needsRowLocationForDeferredCheckConstraints() |
|
boolean |
needsToClone() |
Does the caller of getNextRowFromRowSource() need to clone the row
in order to keep a reference to the row past the
getNextRowFromRowSource() call which returned the row.
|
void |
offendingRowLocation(RowLocation rl,
long containdId) |
|
void |
positionScanAtRowLocation(RowLocation rl) |
Positions the cursor in the specified rowLocation.
|
static java.lang.String |
printQualifiers(Qualifier[][] qualifiers) |
Return a 2-d array of Qualifiers as a String
|
int |
resultSetNumber() |
Get the number of this ResultSet, which is guaranteed to be unique
within a statement.
|
void |
rowLocation(RowLocation rl) |
rowLocation is a callback for the drainer of the row source to return
the rowLocation of the current row, i.e, the row that is being returned
by getNextRowFromRowSource.
|
void |
setCurrentRow(ExecRow row) |
Set the current row to the row passed in.
|
void |
setHasDeferrableChecks() |
Set that we are acting on behalf of an insert result set that has
deferrable check constraints
|
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.
|
protected boolean |
skipRow(ExecRow row) |
Return true if we should skip the scan due to nulls in the row
when the start or stop positioners on the columns containing
null do not implement ordered null semantics.
|
protected boolean |
skipScan(ExecIndexRow startPosition,
ExecIndexRow stopPosition) |
Return true if we should skip the scan due to nulls in the start
or stop position when the predicate on the column(s) in question
do not implement ordered null semantics. beetle 4464, we also compact
the areNullsOrdered flags into checkNullCols here.
|
protected DataValueDescriptor[] |
unpackHashValue(java.lang.Object hashValue) |
Get all of the columns out of a value stored in a BackingStoreHashtable.
|
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, finish, finishAndRTS, getAbsoluteRow, getActivation, getAutoGeneratedKeysResultset, getBeginExecutionTimestamp, getCompactRow, getCurrentTimeMillis, getElapsedMillis, getEndExecutionTimestamp, getEstimatedRowCount, getExecuteTime, getExecutionFactory, getFirstRow, getLanguageConnectionContext, getLastRow, getNextRow, getNextRowCore, getPointOfAttachment, getPreviousRow, getRelativeRow, getRowNumber, getScanIsolationLevel, getSubqueryTrackingArray, getTransactionController, getWarnings, isClosed, isXplainOnlyMode, markAsTopResultSet, modifiedRowCount, open, recordConstructorTime, reopenCore, requiresRelocking, returnsRows, setAfterLastRow, setBeforeFirstRow, setCompactRow, setCompatRow, toXML, toXMLopenCoreclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetTimeSpentpublic final int resultSetNumber
private boolean needsRowLocation
private boolean needsRowLocationForDeferredCheckConstraints
protected ExecRow clonedExecRow
protected TargetResultSet targetResultSet
protected int[] checkNullCols
protected int cncLen
NoPutResultSetImpl(Activation activation, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost)
activation - The activationresultSetNumber - The resultSetNumberoptimizerEstimatedRowCount - The optimizer's estimated number
of rows.optimizerEstimatedCost - The optimizer's estimated costpublic ResultDescription getResultDescription()
getResultDescription in interface ResultSetgetResultDescription in class BasicNoPutResultSetImplpublic java.lang.String getCursorName()
public int resultSetNumber()
NoPutResultSetresultSetNumber in interface NoPutResultSetresultSetNumber in class BasicNoPutResultSetImplNoPutResultSet.resultSetNumber()public void close()
throws StandardException
StandardException - on errorpublic void setTargetResultSet(TargetResultSet trs)
NoPutResultSettrs - The TargetResultSet.NoPutResultSet.setTargetResultSet(org.apache.derby.iapi.sql.execute.TargetResultSet)public void setNeedsRowLocation(boolean needsRowLocation)
NoPutResultSetpublic void setHasDeferrableChecks()
NoPutResultSetpublic FormatableBitSet getValidColumns()
RowSourceRowSource.getValidColumns()public DataValueDescriptor[] getNextRowFromRowSource() throws StandardException
RowSourceA null column can be specified by leaving the object null, or indicated by returning a non-null getValidColumns. On streaming columns, it can be indicated by returning a non-null get FieldStates.
If RowSource.needToClone() is true then the returned row (the DataValueDescriptor[]) is guaranteed not to be modified by drainer of the RowSource (except that the input stream will be read, of course) and drainer will keep no reference to it before making the subsequent nextRow call. So it is safe to return the same DataValueDescriptor[] in subsequent nextRow calls if that is desirable for performance reasons.
If RowSource.needToClone() is false then the returned row (the DataValueDescriptor[]) may be be modified by drainer of the RowSource, and the drainer may keep a reference to it after making the subsequent nextRow call. In this case the client should severe all references to the row after returning it from getNextRowFromRowSource().
StandardException - on errorRowSource.getNextRowFromRowSource()public boolean needsToClone()
RowSourceRowSource.needsToClone()public void closeRowSource()
RowSourceRowSource.closeRowSource()public boolean needsRowLocation()
RowLocationRetRowSourceRowLocationRetRowSource.needsRowLocation()public boolean needsRowLocationForDeferredCheckConstraints()
public void rowLocation(RowLocation rl) throws StandardException
RowLocationRetRowSource
boolean needsRL = rowSource.needsRowLocation();
DataValueDescriptor[] row;
while((row = rowSource.getNextRowFromRowSource()) != null)
{
RowLocation rl = heapConglomerate.insertRow(row);
if (needsRL)
rowSource.rowLocation(rl);
}
StandardException - on errorRowLocationRetRowSource.rowLocation(org.apache.derby.iapi.types.RowLocation)public void offendingRowLocation(RowLocation rl, long containdId) throws StandardException
StandardExceptionprotected void clearOrderableCache(Qualifier[][] qualifiers) throws StandardException
qualifiers - The Qualifiers to clearStandardExceptionpublic final void setCurrentRow(ExecRow row)
row - the new current rowpublic void clearCurrentRow()
public boolean isForUpdate()
isForUpdate in interface NoPutResultSetisForUpdate in class BasicNoPutResultSetImplprotected boolean skipScan(ExecIndexRow startPosition, ExecIndexRow stopPosition) throws StandardException
startPosition - An index row for the start positionstopPosition - An index row for the stop positionStandardExceptionprotected boolean skipRow(ExecRow row) throws StandardException
row - An index rowStandardExceptionpublic static java.lang.String printQualifiers(Qualifier[][] qualifiers)
public void updateRow(ExecRow row, RowChanger rowChanger) throws StandardException
NoPutResultSetrow - 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.This method is result sets used for scroll insensitive updatable
result sets for other result set it is a no-op.public void markRowAsDeleted()
throws StandardException
NoPutResultSetStandardException - thrown on failure.This method is result sets used for scroll insensitive updatable
result sets for other result set it is a no-op.public void positionScanAtRowLocation(RowLocation rl) throws StandardException
NoPutResultSetrl - row location of the current cursor rowStandardException - thrown on failure to
get location from storage engineThis method is result sets used for scroll insensitive updatable
result sets for other result set it is a no-op.protected DataValueDescriptor[] unpackHashValue(java.lang.Object hashValue)
Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.