ResultSet
CallStatementResultSet
, DMLWriteResultSet
, MergeResultSet
, MiscResultSet
abstract class NoRowsResultSetImpl extends java.lang.Object implements ResultSet
An implementation must provide a ResultSet.open() method that performs the required action.
ResultSet.returnsRows() returns false and any method that fetches a row will throw an exception.
Modifier and Type | Field | Description |
---|---|---|
(package private) Activation |
activation |
|
protected long |
beginExecutionTime |
|
protected long |
beginTime |
|
protected long |
endExecutionTime |
|
protected long |
endTime |
|
private int |
firstColumn |
|
private int[] |
generatedColumnPositions |
|
private boolean |
isOpen |
True if the result set has been opened, and not yet closed.
|
(package private) LanguageConnectionContext |
lcc |
|
private DataValueDescriptor[] |
normalizedGeneratedValues |
|
private boolean |
statisticsTimingOn |
|
private NoPutResultSet[] |
subqueryTrackingArray |
CURRENT_RESULTSET_ONLY, ENTIRE_RESULTSET_TREE, ISAFTERLAST, ISBEFOREFIRST, ISFIRST, ISLAST
Constructor | Description |
---|---|
NoRowsResultSetImpl(Activation activation) |
Modifier and Type | Method | Description |
---|---|---|
void |
addWarning(java.sql.SQLWarning w) |
Add a warning to this result set.
|
boolean |
checkRowPosition(int isType) |
Determine if the cursor is before the first row in the result
set.
|
void |
clearCurrentRow() |
Clear the current row.
|
void |
close(boolean underMerge) |
Dump the stat if not already done so.
|
boolean |
doesCommit() |
Does this ResultSet cause a commit or rollback.
|
void |
evaluateGenerationClauses(GeneratedMethod generationClauses,
Activation activation,
NoPutResultSet source,
ExecRow newRow,
boolean isUpdate) |
Compute the generation clauses on the current row in order to fill in
computed columns.
|
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 |
getAbsoluteRow(int row) |
Returns the row at the absolute position from the query,
and returns NULL when there is no such position.
|
Activation |
getActivation() |
|
ResultSet |
getAutoGeneratedKeysResultset() |
ResultSet for rows inserted into the table (contains auto-generated keys columns only)
|
java.sql.Timestamp |
getBeginExecutionTimestamp() |
Get the Timestamp for the beginning of execution.
|
protected long |
getCurrentTimeMillis() |
Return the current time in milliseconds, if DEBUG and RunTimeStats is
on, else return 0.
|
java.lang.String |
getCursorName() |
Return the cursor name, null in this case.
|
java.sql.Timestamp |
getEndExecutionTimestamp() |
Get the Timestamp for the end of execution.
|
long |
getExecuteTime() |
Get the execution time in milliseconds.
|
ExecRow |
getFirstRow() |
Returns the first row from the query, and returns NULL when there
are no rows.
|
ExecRow |
getLastRow() |
Returns the last row from the query, and returns NULL when there
are no rows.
|
ExecRow |
getNextRow() |
No rows to return, so throw an exception.
|
ExecRow |
getPreviousRow() |
Returns the previous row from the query, and returns NULL when there
are no more previous rows.
|
java.lang.String |
getQueryPlanText(int depth) |
RESOLVE - This method will go away once it is overloaded in all subclasses.
|
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.
|
ResultDescription |
getResultDescription() |
Returns null.
|
int |
getRowNumber() |
Returns the row number of the current row.
|
NoPutResultSet[] |
getSubqueryTrackingArray(int numSubqueries) |
Get the subquery ResultSet tracking array from the top ResultSet.
|
long |
getTimeSpent(int type) |
Return the total amount of time spent in this ResultSet
|
java.sql.SQLWarning |
getWarnings() |
Return the set of warnings generated during the execution of
this result set.
|
boolean |
isClosed() |
Find out if the
ResultSet is closed. |
long |
modifiedRowCount() |
Returns zero.
|
boolean |
returnsRows() |
Returns FALSE
|
ExecRow |
setAfterLastRow() |
Sets the current position to after the last row and returns NULL
because there is no current row.
|
ExecRow |
setBeforeFirstRow() |
Sets the current position to before the first row and returns NULL
because there is no current row.
|
(package private) void |
setup() |
Set up the result set for use.
|
private void |
setupGeneratedColumns(Activation activation,
ValueRow newRow) |
Construct support for normalizing generated columns.
|
org.w3c.dom.Element |
toXML(org.w3c.dom.Element parentNode,
java.lang.String tag) |
Produce an xml image of this ResultSet and its descendant ResultSets.
|
final Activation activation
private NoPutResultSet[] subqueryTrackingArray
private final boolean statisticsTimingOn
private boolean isOpen
final LanguageConnectionContext lcc
protected long beginTime
protected long endTime
protected long beginExecutionTime
protected long endExecutionTime
private int firstColumn
private int[] generatedColumnPositions
private DataValueDescriptor[] normalizedGeneratedValues
NoRowsResultSetImpl(Activation activation)
void setup() throws StandardException
open()
.StandardException
- thrown on errorpublic final boolean returnsRows()
returnsRows
in interface ResultSet
public long modifiedRowCount()
modifiedRowCount
in interface ResultSet
public ResultDescription getResultDescription()
getResultDescription
in interface ResultSet
public final Activation getActivation()
getActivation
in interface ResultSet
public final ExecRow getAbsoluteRow(int row) throws StandardException
getAbsoluteRow
in interface ResultSet
row
- The position.StandardException
- Thrown on failureRow
public final ExecRow getRelativeRow(int row) throws StandardException
getRelativeRow
in interface ResultSet
row
- The position.StandardException
- Thrown on failureRow
public final ExecRow setBeforeFirstRow() throws StandardException
setBeforeFirstRow
in interface ResultSet
StandardException
- Thrown on failureRow
public final ExecRow getFirstRow() throws StandardException
getFirstRow
in interface ResultSet
StandardException
- Thrown on failureRow
public final ExecRow getNextRow() throws StandardException
getNextRow
in interface ResultSet
StandardException
- Always throws a
StandardException to indicate
that this method is not intended to
be used.Row
public final ExecRow getPreviousRow() throws StandardException
getPreviousRow
in interface ResultSet
StandardException
- Thrown on failureRow
public final ExecRow getLastRow() throws StandardException
getLastRow
in interface ResultSet
StandardException
- Thrown on failureRow
public final ExecRow setAfterLastRow() throws StandardException
setAfterLastRow
in interface ResultSet
StandardException
- Thrown on failureRow
public final void clearCurrentRow()
clearCurrentRow
in interface ResultSet
public final boolean checkRowPosition(int isType)
checkRowPosition
in interface ResultSet
public final int getRowNumber()
getRowNumber
in interface ResultSet
public void close(boolean underMerge) throws StandardException
underMerge
- True if this is part of an action of a MERGE statement.StandardException
- thrown on errorpublic boolean isClosed()
ResultSet
is closed.public void finish() throws StandardException
ResultSet
finish
in interface ResultSet
StandardException
- on errorpublic long getExecuteTime()
getExecuteTime
in interface ResultSet
public java.sql.Timestamp getBeginExecutionTimestamp()
getBeginExecutionTimestamp
in interface ResultSet
public java.sql.Timestamp getEndExecutionTimestamp()
getEndExecutionTimestamp
in interface ResultSet
public java.lang.String getQueryPlanText(int depth)
depth
- Indentation level.public 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 final NoPutResultSet[] getSubqueryTrackingArray(int numSubqueries)
ResultSet
getSubqueryTrackingArray
in interface ResultSet
numSubqueries
- The size of the array (For allocation on demand.)ResultSet.getSubqueryTrackingArray(int)
public ResultSet getAutoGeneratedKeysResultset()
ResultSet
getAutoGeneratedKeysResultset
in interface ResultSet
ResultSet.getAutoGeneratedKeysResultset()
public java.lang.String getCursorName()
getCursorName
in interface ResultSet
ResultSet.getCursorName()
protected final long getCurrentTimeMillis()
public void evaluateGenerationClauses(GeneratedMethod generationClauses, Activation activation, NoPutResultSet source, ExecRow newRow, boolean isUpdate) throws StandardException
generationClauses
- the generated method which evaluates generation clausesactivation
- the thread-specific instance of the generated classsource
- the tuple stream driving this INSERT/UPDATEnewRow
- the base row being stuffedisUpdate
- true if this is an UPDATE. false otherwise.StandardException
private void setupGeneratedColumns(Activation activation, ValueRow newRow) throws StandardException
StandardException
public boolean doesCommit()
public void addWarning(java.sql.SQLWarning w)
ResultSet
addWarning
in interface ResultSet
w
- the warning to addpublic java.sql.SQLWarning getWarnings()
ResultSet
getWarnings
in interface ResultSet
public org.w3c.dom.Element toXML(org.w3c.dom.Element parentNode, java.lang.String tag) throws java.lang.Exception
ResultSet
Produce an xml image of this ResultSet and its descendant ResultSets. Appends an element to the parentNode and returns the appended element.
Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.