NoPutResultSet
, ResultSet
, RowLocationRetRowSource
, RowSource
AnyResultSet
, CurrentOfResultSet
, GenericAggregateResultSet
, HashTableResultSet
, IndexRowToBaseRowResultSet
, JoinResultSet
, MaterializedResultSet
, NormalizeResultSet
, OnceResultSet
, ProjectRestrictResultSet
, RowCountResultSet
, RowResultSet
, ScanResultSet
, ScrollInsensitiveResultSet
, SetOpResultSet
, SortResultSet
, UnionResultSet
, VTIResultSet
, WindowResultSet
abstract 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, subqueryTrackingArray
ABSOLUTE, FIRST, LAST, NEXT, PREVIOUS, RELATIVE, TEMPORARY_RESULT_SET_NUMBER
CURRENT_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, toXML
openCore
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getTimeSpent
public 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 ResultSet
getResultDescription
in class BasicNoPutResultSetImpl
public java.lang.String getCursorName()
public int resultSetNumber()
NoPutResultSet
resultSetNumber
in interface NoPutResultSet
resultSetNumber
in class BasicNoPutResultSetImpl
NoPutResultSet.resultSetNumber()
public void close() throws StandardException
StandardException
- on errorpublic void setTargetResultSet(TargetResultSet trs)
NoPutResultSet
trs
- The TargetResultSet.NoPutResultSet.setTargetResultSet(org.apache.derby.iapi.sql.execute.TargetResultSet)
public void setNeedsRowLocation(boolean needsRowLocation)
NoPutResultSet
public void setHasDeferrableChecks()
NoPutResultSet
public FormatableBitSet getValidColumns()
RowSource
RowSource.getValidColumns()
public DataValueDescriptor[] getNextRowFromRowSource() throws StandardException
RowSource
A 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()
RowSource
RowSource.needsToClone()
public void closeRowSource()
RowSource
RowSource.closeRowSource()
public boolean needsRowLocation()
RowLocationRetRowSource
RowLocationRetRowSource.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
StandardException
protected void clearOrderableCache(Qualifier[][] qualifiers) throws StandardException
qualifiers
- The Qualifiers to clearStandardException
public final void setCurrentRow(ExecRow row)
row
- the new current rowpublic void clearCurrentRow()
public boolean isForUpdate()
isForUpdate
in interface NoPutResultSet
isForUpdate
in class BasicNoPutResultSetImpl
protected boolean skipScan(ExecIndexRow startPosition, ExecIndexRow stopPosition) throws StandardException
startPosition
- An index row for the start positionstopPosition
- An index row for the stop positionStandardException
protected boolean skipRow(ExecRow row) throws StandardException
row
- An index rowStandardException
public static java.lang.String printQualifiers(Qualifier[][] qualifiers)
public void updateRow(ExecRow row, RowChanger rowChanger) throws StandardException
NoPutResultSet
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.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
NoPutResultSet
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 positionScanAtRowLocation(RowLocation rl) throws StandardException
NoPutResultSet
rl
- 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.