CursorResultSet
, NoPutResultSet
, ResultSet
, RowLocationRetRowSource
, RowSource
class NormalizeResultSet extends NoPutResultSetImpl implements CursorResultSet
BasicNoPutResultSetImpl.FieldComparator
Modifier and Type | Field | Description |
---|---|---|
private DataValueDescriptor[] |
cachedDestinations |
This array contains data value descriptors that can be used (and reused)
by normalizeRow() to hold the normalized column values.
|
private DataTypeDescriptor[] |
desiredTypes |
|
private ExecRow |
normalizedRow |
|
private int |
numCols |
|
private ResultDescription |
resultDescription |
|
NoPutResultSet |
source |
|
private int |
startCol |
activation, beginTime, closeTime, compactRow, constructorTime, currentRow, endExecutionTime, finished, isOpen, isTopResultSet, nextTime, numOpens, openTime, optimizerEstimatedCost, optimizerEstimatedRowCount, 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 |
---|---|
NormalizeResultSet(NoPutResultSet source,
Activation activation,
int resultSetNumber,
int erdNumber,
double optimizerEstimatedRowCount,
double optimizerEstimatedCost,
boolean forUpdate) |
Constructor for a NormalizeResultSet
|
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
If the result set has been opened,
close the open scan.
|
static int |
computeStartColumn(boolean isUpdate,
ResultDescription desc) |
Compute the start column for an update/insert.
|
private DataTypeDescriptor[] |
fetchResultTypes(ResultDescription desc) |
Fetch the result datatypes out of the activation.
|
private DataValueDescriptor |
getCachedDestination(int col) |
Get a cached data value descriptor that can receive the normalized
value of the specified column.
|
ExecRow |
getCurrentRow() |
Gets information from last getNextRow call.
|
private DataTypeDescriptor |
getDesiredType(int col) |
Get a data type descriptor that describes the desired type for the
specified column.
|
ExecRow |
getNextRowCore() |
Return the requested values computed
from the next row (if any) for which
the restriction evaluates to true.
|
RowLocation |
getRowLocation() |
Gets information from its source.
|
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.
|
static DataValueDescriptor |
normalizeColumn(DataTypeDescriptor dtd,
ExecRow sourceRow,
int sourceColumnPosition,
DataValueDescriptor resultCol,
ResultDescription desc) |
Normalize a column.
|
private ExecRow |
normalizeRow(ExecRow sourceRow) |
Normalize a row.
|
void |
openCore() |
open a scan on the source. scan parameters are evaluated
at each open, so there is probably some way of altering
their values...
|
void |
reopenCore() |
reopen 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, finish, 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, 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, finish, getAbsoluteRow, getActivation, getAutoGeneratedKeysResultset, getBeginExecutionTimestamp, getCursorName, getEndExecutionTimestamp, getExecuteTime, getFirstRow, getLastRow, getNextRow, getPreviousRow, getRelativeRow, getResultDescription, getRowNumber, getSubqueryTrackingArray, getWarnings, isClosed, modifiedRowCount, open, returnsRows, setAfterLastRow, setBeforeFirstRow, toXML
public NoPutResultSet source
private ExecRow normalizedRow
private int numCols
private int startCol
private final DataValueDescriptor[] cachedDestinations
private ResultDescription resultDescription
private DataTypeDescriptor[] desiredTypes
public NormalizeResultSet(NoPutResultSet source, Activation activation, int resultSetNumber, int erdNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost, boolean forUpdate) throws StandardException
source
- The NoPutResultSet from which to get rows
to be normalizedactivation
- The activation for this executionresultSetNumber
- The resultSetNumbererdNumber
- The integer for the ResultDescriptionStandardException
- on errorpublic void openCore() throws StandardException
openCore
in interface NoPutResultSet
StandardException
- thrown on failurepublic void reopenCore() throws StandardException
reopenCore
in interface NoPutResultSet
reopenCore
in class BasicNoPutResultSetImpl
StandardException
- thrown if cursor finished.NoPutResultSet.openCore()
public ExecRow getNextRowCore() throws StandardException
NoPutResultSet
restriction and projection parameters are evaluated for each row.
getNextRowCore
in interface NoPutResultSet
getNextRowCore
in class BasicNoPutResultSetImpl
StandardException
- thrown on failureNoPutResultSet.getNextRowCore()
public void close() throws StandardException
close
in interface ResultSet
close
in class NoPutResultSetImpl
StandardException
- thrown 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() throws StandardException
getRowLocation
in interface CursorResultSet
StandardException
- thrown on failureCursorResultSet
public ExecRow getCurrentRow()
getCurrentRow
in interface CursorResultSet
CursorResultSet
public static int computeStartColumn(boolean isUpdate, ResultDescription desc)
Compute the start column for an update/insert.
isUpdate
- True if we are executing an UPDATE statementdesc
- Metadata describing a result row
public static DataValueDescriptor normalizeColumn(DataTypeDescriptor dtd, ExecRow sourceRow, int sourceColumnPosition, DataValueDescriptor resultCol, ResultDescription desc) throws StandardException
dtd
- Data type to coerce tosourceRow
- row holding the source columnsourceColumnPosition
- position of column in rowresultCol
- where to stuff the coerced valuedesc
- Additional metadata for error reporting if necessaryStandardException
- thrown on failureprivate ExecRow normalizeRow(ExecRow sourceRow) throws StandardException
sourceRow
- The row to normalizeStandardException
- thrown on failureprivate DataValueDescriptor getCachedDestination(int col) throws StandardException
col
- the column number (1-based)StandardException
- if a new data value descriptor cannot be
createdprivate DataTypeDescriptor getDesiredType(int col)
col
- the column number (1-based)private DataTypeDescriptor[] fetchResultTypes(ResultDescription desc)
Fetch the result datatypes out of the activation.
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.