| java.lang.Object org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl
All known Subclasses: org.apache.derby.impl.sql.execute.NoPutResultSetImpl,
BasicNoPutResultSetImpl | abstract class BasicNoPutResultSetImpl implements NoPutResultSet(Code) | | Abstract ResultSet for for operations that return rows but
do not allow the caller to put data on output pipes. This
basic implementation does not include support for an Activiation.
See NoPutResultSetImpl.java for an implementaion with support for
an activiation.
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.
|
Constructor Summary | |
| BasicNoPutResultSetImpl(ResultDescription resultDescription, Activation activation, double optimizerEstimatedRowCount, double optimizerEstimatedCost) Constructor.
Sets beginTime for all children to use to measue constructor time.
Parameters: resultDescription - the result description. |
Method Summary | |
final protected void | addWarning(SQLWarning w) | protected void | attachStatementContext() Attach this result set to the top statement context on the stack.
Result sets can be directly read from the JDBC layer. | public void | checkCancellationFlag() Checks whether the currently executing statement has been cancelled. | public boolean | checkRowPosition(int isType) Determine if the cursor is before the first row in the result
set. | public void | cleanUp() | final protected String | dumpTimeStats(String indent, String subIndent) Dump out the time information for run time stats. | public void | finish() | final protected void | finishAndRTS() | public ExecRow | getAbsoluteRow(int row) Returns the row at the absolute position from the query,
and returns NULL when there is no such position. | final public Activation | getActivation() | public ResultSet | getAutoGeneratedKeysResultset() | public Timestamp | getBeginExecutionTimestamp() Get the Timestamp for the beginning of execution. | protected ExecRow | getCompactRow(ExecRow candidate, FormatableBitSet accessedCols, FormatableBitSet otherCols, boolean isKeyed) Get a compacted version of the candidate row according to the
columns specified in the bit map. | final protected long | getCurrentTimeMillis() Return the current time in milliseconds, if DEBUG and RunTimeStats is
on, else return 0. | final protected long | getElapsedMillis(long beginTime) Return the elapsed time in milliseconds, between now and the beginTime, if
DEBUG and RunTimeStats is on, else return 0. | public Timestamp | getEndExecutionTimestamp() Get the Timestamp for the end of execution. | public double | getEstimatedRowCount() | public long | getExecuteTime() Get the execution time in milliseconds. | final ExecutionFactory | getExecutionFactory() | public ExecRow | getFirstRow() Returns the first row from the query, and returns NULL when there
are no rows. | final protected LanguageConnectionContext | getLanguageConnectionContext() Cache the language connection context. | public ExecRow | getLastRow() Returns the last row from the query, and returns NULL when there
are no rows. | final public ExecRow | getNextRow() 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.
NOTE: This method should only be called on the top ResultSet
of a ResultSet tree to ensure that the entire ResultSet
tree gets closed down on an error. | abstract public ExecRow | getNextRowCore() | public int | getPointOfAttachment() | public ExecRow | getPreviousRow() Returns the previous row from the query, and returns NULL when there
are no more previous rows. | public ExecRow | getRelativeRow(int row) Returns the row at the relative position from the current
cursor position, and returns NULL when there is no such position. | public ResultDescription | getResultDescription() | public int | getRowNumber() Returns the row number of the current row. | public int | getScanIsolationLevel() | final public NoPutResultSet[] | getSubqueryTrackingArray(int numSubqueries) | final TransactionController | getTransactionController() Get the current transaction controller. | final public SQLWarning | getWarnings() | public boolean | isClosed() Report if closed. | public boolean | isForUpdate() | public void | markAsTopResultSet() Mark the ResultSet as the topmost one in the ResultSet tree. | final public int | modifiedRowCount() | final public void | open() open a scan on the table. | abstract public void | openCore() | public void | reopenCore() This is the default implementation of reopenCore().
It simply does a close() followed by an open(). | public boolean | requiresRelocking() | public int | resultSetNumber() | public boolean | returnsRows() Returns true. | public ExecRow | setAfterLastRow() Sets the current position to after the last row and returns NULL
because there is no current row. | public ExecRow | setBeforeFirstRow() Sets the current position to before the first row and returns NULL
because there is no current row. | protected ExecRow | setCompactRow(ExecRow candidateRow, ExecRow compactRow) Copy columns from the candidate row from the store to the given
compact row. | final protected void | setCompatRow(ExecRow compactRow, Object[] sourceRow) |
beginTime | public long beginTime(Code) | | |
closeTime | public long closeTime(Code) | | |
constructorTime | public long constructorTime(Code) | | |
endExecutionTime | protected long endExecutionTime(Code) | | |
finished | protected boolean finished(Code) | | |
isOpen | protected boolean isOpen(Code) | | |
isTopResultSet | protected boolean isTopResultSet(Code) | | |
nextTime | public long nextTime(Code) | | |
numOpens | public int numOpens(Code) | | |
openTime | public long openTime(Code) | | |
optimizerEstimatedCost | public double optimizerEstimatedCost(Code) | | |
optimizerEstimatedRowCount | public double optimizerEstimatedRowCount(Code) | | |
rowsFiltered | public int rowsFiltered(Code) | | |
rowsSeen | public int rowsSeen(Code) | | |
startExecutionTime | protected long startExecutionTime(Code) | | |
BasicNoPutResultSetImpl | BasicNoPutResultSetImpl(ResultDescription resultDescription, Activation activation, double optimizerEstimatedRowCount, double optimizerEstimatedCost)(Code) | | Constructor.
Sets beginTime for all children to use to measue constructor time.
Parameters: resultDescription - the result description. May be null. Parameters: activation - The activation Parameters: optimizerEstimatedRowCount - The optimizer's estimate of thetotal number of rows for thisresult set Parameters: optimizerEstimatedCost - The optimizer's estimated cost forthis result set |
attachStatementContext | protected void attachStatementContext() throws StandardException(Code) | | Attach this result set to the top statement context on the stack.
Result sets can be directly read from the JDBC layer. The JDBC layer
will push and pop a statement context around each ResultSet.getNext().
There's no guarantee that the statement context used for the last
getNext() will be the context used for the current getNext(). The
last statement context may have been popped off the stack and so
will not be available for cleanup if an error occurs. To make sure
that we will be cleaned up, we always attach ourselves to the top
context.
The fun and games occur in nested contexts: using JDBC result sets inside
user code that is itself invoked from queries or CALL statements.
exception: StandardException - thrown if cursor finished. |
checkCancellationFlag | public void checkCancellationFlag() throws StandardException(Code) | | Checks whether the currently executing statement has been cancelled.
This is done by checking the statement's allocated StatementContext
object.
See Also: StatementContext |
checkRowPosition | public boolean checkRowPosition(int isType) throws StandardException(Code) | | Determine if the cursor is before the first row in the result
set.
true if before the first row, false otherwise. Returnsfalse when the result set contains no rows. |
dumpTimeStats | final protected String dumpTimeStats(String indent, String subIndent)(Code) | | Dump out the time information for run time stats.
Nothing. |
getAbsoluteRow | public ExecRow getAbsoluteRow(int row) throws StandardException(Code) | | Returns the row at the absolute position from the query,
and returns NULL when there is no such position.
(Negative position means from the end of the result set.)
Moving the cursor to an invalid position leaves the cursor
positioned either before the first row (negative position)
or after the last row (positive position).
NOTE: An exception will be thrown on 0.
Parameters: row - The position. The row at the absolute position, or NULL if no such position. exception: StandardException - Thrown on failure See Also: Row |
getBeginExecutionTimestamp | public Timestamp getBeginExecutionTimestamp()(Code) | | Get the Timestamp for the beginning of execution.
Timestamp The Timestamp for the beginning of execution. |
getCompactRow | protected ExecRow getCompactRow(ExecRow candidate, FormatableBitSet accessedCols, FormatableBitSet otherCols, boolean isKeyed) throws StandardException(Code) | | Get a compacted version of the candidate row according to the
columns specified in the bit map. Share the holders between rows.
If there is no bit map, use the candidate row as the compact row.
Also, create an array of ints mapping base column positions to
compact column positions, to make it cheaper to copy columns to
the compact row, if we ever have to do it again.
Parameters: candidate - The row to get the columns from Parameters: accessedCols - A bit map of the columns that are accessed inthe candidate row Parameters: otherCols - An bit map of other column ids - this is usedin case columns from an index row will becopied into a heap row - in this case, weneed to be sure there are enough columns inthe compact row. This parameter is null ifcolumns will not be copied from an index rowto a compact heap row. The column numbers inthe bit map are zero-based. Parameters: isKeyed - Tells whether to return a ValueRow or an IndexRow A compact row. |
getCurrentTimeMillis | final protected long getCurrentTimeMillis()(Code) | | Return the current time in milliseconds, if DEBUG and RunTimeStats is
on, else return 0. (Only pay price of system call if need to.)
long Current time in milliseconds. |
getElapsedMillis | final protected long getElapsedMillis(long beginTime)(Code) | | Return the elapsed time in milliseconds, between now and the beginTime, if
DEBUG and RunTimeStats is on, else return 0.
(Only pay price of system call if need to.)
long Elapsed time in milliseconds. |
getEndExecutionTimestamp | public Timestamp getEndExecutionTimestamp()(Code) | | Get the Timestamp for the end of execution.
Timestamp The Timestamp for the end of execution. |
getExecuteTime | public long getExecuteTime()(Code) | | Get the execution time in milliseconds.
long The execution time in milliseconds. |
getExecutionFactory | final ExecutionFactory getExecutionFactory()(Code) | | Get a execution factory
the execution factory |
getLanguageConnectionContext | final protected LanguageConnectionContext getLanguageConnectionContext()(Code) | | Cache the language connection context. Return it.
the language connection context |
getNextRow | final public ExecRow getNextRow() throws StandardException(Code) | | 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.
NOTE: This method should only be called on the top ResultSet
of a ResultSet tree to ensure that the entire ResultSet
tree gets closed down on an error. the getNextRowCore() method
will be called for all other ResultSets in the tree.
exception: StandardException - thrown on failure. exception: StandardException - ResultSetNotOpen thrown if not yet open. the next row in the result |
getPreviousRow | public ExecRow getPreviousRow() throws StandardException(Code) | | Returns the previous row from the query, and returns NULL when there
are no more previous rows.
The previous row, or NULL if no more previous rows. exception: StandardException - Thrown on failure See Also: Row |
getRelativeRow | public ExecRow getRelativeRow(int row) throws StandardException(Code) | | Returns the row at the relative position from the current
cursor position, and returns NULL when there is no such position.
(Negative position means toward the beginning of the result set.)
Moving the cursor to an invalid position leaves the cursor
positioned either before the first row (negative position)
or after the last row (positive position).
NOTE: 0 is valid.
NOTE: An exception is thrown if the cursor is not currently
positioned on a row.
Parameters: row - The position. The row at the relative position, or NULL if no such position. exception: StandardException - Thrown on failure See Also: Row |
getResultDescription | public ResultDescription getResultDescription()(Code) | | Returns the description of the table's rows
|
getRowNumber | public int getRowNumber()(Code) | | Returns the row number of the current row. Row
numbers start from 1 and go to 'n'. Corresponds
to row numbering used to position current row
in the result set (as per JDBC).
the row number, or 0 if not on a row |
isClosed | public boolean isClosed()(Code) | | Report if closed.
|
isForUpdate | public boolean isForUpdate()(Code) | | Is this ResultSet or it's source result set for update
This method will be overriden in the inherited Classes
if it is true
Whether or not the result set is for update. |
markAsTopResultSet | public void markAsTopResultSet()(Code) | | Mark the ResultSet as the topmost one in the ResultSet tree.
Useful for closing down the ResultSet on an error.
|
modifiedRowCount | final public int modifiedRowCount()(Code) | | |
open | final public void open() throws StandardException(Code) | | open a scan on the table. scan parameters are evaluated
at each open, so there is probably some way of altering
their values...
NOTE: This method should only be called on the top ResultSet
of a ResultSet tree to ensure that the entire ResultSet
tree gets closed down on an error. the openCore() method
will be called for all other ResultSets in the tree.
exception: StandardException - thrown if cursor finished. |
reopenCore | public void reopenCore() throws StandardException(Code) | | This is the default implementation of reopenCore().
It simply does a close() followed by an open(). If
there are optimizations to be made (caching, etc), this
is a good place to do it -- this will be overridden
by a number of resultSet imlementations. and SHOULD
be overridden by any node that can get between a base
table and a join.
See Also: NoPutResultSet.openCore exception: StandardException - thrown if cursor finished. |
returnsRows | public boolean returnsRows()(Code) | | Returns true.
|
setCompactRow | protected ExecRow setCompactRow(ExecRow candidateRow, ExecRow compactRow)(Code) | | Copy columns from the candidate row from the store to the given
compact row. If there is no column map, just use the candidate row.
This method assumes the above method (getCompactRow()) was called
first. getCompactRow() sets up the baseColumnMap.
Parameters: candidateRow - The candidate row from the store Parameters: compactRow - The compact row to fill in The compact row to use |
|
|