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.
| Modifier and Type | Class and Description |
|---|---|
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| protected final Activation | |
| private int[] | |
| public long | |
| public long | |
| pack-priv ExecRow | |
| public long | |
| protected ExecRow | |
| protected long | |
| protected boolean | |
| protected boolean | |
| protected boolean | |
| public long | |
| public int | |
| public long | |
| public double | |
| public double | |
| pack-priv ResultDescription | |
| public int | |
| public int | |
| protected long | |
| private StatementContext | |
| private final boolean | |
| public NoPutResultSet[] | |
| private transient TransactionController | |
| private SQLWarning |
| Access | Constructor and Description |
|---|---|
| pack-priv | BasicNoPutResultSetImpl(ResultDescription
the result description. May be null. resultDescription, Activation The activation activation, double The optimizer's estimate of the
total number of rows for this
result set optimizerEstimatedRowCount, double The optimizer's estimated cost for
this result set optimizerEstimatedCost)Constructor. |
| Modifier and Type | Method and Description |
|---|---|
| public final void | addWarning(SQLWarning
the warning to add w)Implements org. Add a warning to this result set. |
| protected void | |
| public void | |
| public boolean | Returns: true if before the first row, false otherwise. Returns false when the result set contains no rows.The desired position type isType)Implements org. Determine if the cursor is before the first row in the result set. |
| public static Element | childrenToXML(Element outerNode, ResultSet outerRS)
Pretty-print the inner ResultSet fields inside an outer ResultSet. |
| public void | |
| protected final String | Returns: Nothing.Dump out the time information for run time stats. |
| private static void | findResultSetFields(ArrayList<Field> fieldList, final Class<?> klass)
Find all fields of type ResultSet. |
| public void | finish()
Implements org. 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(). |
| protected final void | |
| public ExecRow | Returns: The row at the absolute position, or NULL if no such position.The position. row)Implements org. Returns the row at the absolute position from the query, and returns NULL when there is no such position. |
| public final Activation | |
| public ResultSet | getAutoGeneratedKeysResultset()
Implements org. ResultSet for rows inserted into the table (contains auto-generated keys columns only) |
| public Timestamp | Returns: Timestamp The Timestamp for the beginning of execution.Implements org. Get the Timestamp for the beginning of execution. |
| protected ExecRow | Returns: A compact row.The row to get the columns from candidate, FormatableBitSet A bit map of the columns that are accessed in
the candidate row accessedCols, boolean Tells whether to return a ValueRow or an IndexRow isKeyed)Get a compacted version of the candidate row according to the columns specified in the bit map. |
| protected final long | Returns: long Current time in milliseconds.Return the current time in milliseconds, if DEBUG and RunTimeStats is on, else return 0. |
| protected final long | Returns: long Elapsed time in milliseconds.Return the elapsed time in milliseconds, between now and the beginTime, if DEBUG and RunTimeStats is on, else return 0. |
| public Timestamp | Returns: Timestamp The Timestamp for the end of execution.Implements org. Get the Timestamp for the end of execution. |
| public double | getEstimatedRowCount()
Implements org. Get the estimated row count from this result set. |
| public long | Returns: long The execution time in milliseconds.Implements org. Get the execution time in milliseconds. |
| pack-priv final ExecutionFactory | |
| public ExecRow | Returns: The first row, or NULL if no rows.Implements org. Returns the first row from the query, and returns NULL when there are no rows. |
| protected final LanguageConnectionContext | Returns: the language connection contextCache the language connection context. |
| public ExecRow | Returns: The last row, or NULL if no rows.Implements org. Returns the last row from the query, and returns NULL when there are no rows. |
| public final ExecRow | Returns: the next row in the resultImplements org. Return the requested values computed from the next row (if any) for which the restriction evaluates to true. |
| public abstract ExecRow | getNextRowCore()
Redeclares org. Return the requested values computed from the next row (if any) for which the restriction evaluates to true. |
| public int | getPointOfAttachment()
Implements org. Return the point of attachment for this subquery. |
| public ExecRow | Returns: The previous row, or NULL if no more previous rows.Implements org. Returns the previous row from the query, and returns NULL when there are no more previous rows. |
| public ExecRow | Returns: The row at the relative position, or NULL if no such position.The position. row)Implements org. Returns the row at the relative position from the current cursor position, and returns NULL when there is no such position. |
| public ResultDescription | getResultDescription()
Implements org. Returns the description of the table's rows |
| public int | Returns: the row number, or 0 if not on a rowImplements org. Returns the row number of the current row. |
| public int | getScanIsolationLevel()
Implements org. Return the isolation level of the scan in the result set. |
| public final NoPutResultSet[] | getSubqueryTrackingArray(int
The size of the array (For allocation on demand.) numSubqueries)Implements org. Get the subquery ResultSet tracking array from the top ResultSet. |
| pack-priv final TransactionController | |
| public final SQLWarning | getWarnings()
Implements org. Return the set of warnings generated during the execution of this result set. |
| public boolean | |
| public boolean | Returns: Whether or not the result set is for update.Implements org. Is this ResultSet or it's source result set for update This method will be overriden in the inherited Classes if it is true |
| protected final boolean | |
| public void | markAsTopResultSet()
Implements org. Mark the ResultSet as the topmost one in the ResultSet tree. |
| public final long | modifiedRowCount()
Implements org. Returns the number of rows affected by the statement. |
| public final void | |
| protected final void | |
| public void | reopenCore()
Implements org. This is the default implementation of reopenCore(). |
| public boolean | requiresRelocking()
Implements org. Do we need to relock the row when going to the heap. |
| public int | resultSetNumber()
Implements org. Get the number of this ResultSet, which is guaranteed to be unique within a statement. |
| public boolean | |
| public ExecRow | Returns: NULL.Implements org. Sets the current position to after the last row and returns NULL because there is no current row. |
| public ExecRow | Returns: NULL.Implements org. Sets the current position to before the first row and returns NULL because there is no current row. |
| protected ExecRow | Returns: The compact row to useThe candidate row from the store candidateRow, ExecRow The compact row to fill in compactRow)Copy columns from the candidate row from the store to the given compact row. |
| protected final void | |
| private static String | |
| public Element | toXML(Element
Node to put content into. parentNode, String Element tag for content tag)Implements org. Produce an xml image of this ResultSet and its descendant ResultSets. |
| public static Element |
| activation | back to summary |
|---|---|
| protected final Activation activation | |
| baseColumnMap | back to summary |
|---|---|
| private int[] baseColumnMap | |
| beginTime | back to summary |
|---|---|
| public long beginTime | |
| closeTime | back to summary |
|---|---|
| public long closeTime | |
| compactRow | back to summary |
|---|---|
| pack-priv ExecRow compactRow | |
| constructorTime | back to summary |
|---|---|
| public long constructorTime | |
| currentRow | back to summary |
|---|---|
| protected ExecRow currentRow | |
| endExecutionTime | back to summary |
|---|---|
| protected long endExecutionTime | |
| finished | back to summary |
|---|---|
| protected boolean finished | |
| isOpen | back to summary |
|---|---|
| protected boolean isOpen | |
| isTopResultSet | back to summary |
|---|---|
| protected boolean isTopResultSet | |
| nextTime | back to summary |
|---|---|
| public long nextTime | |
| numOpens | back to summary |
|---|---|
| public int numOpens | |
| openTime | back to summary |
|---|---|
| public long openTime | |
| optimizerEstimatedCost | back to summary |
|---|---|
| public double optimizerEstimatedCost | |
| optimizerEstimatedRowCount | back to summary |
|---|---|
| public double optimizerEstimatedRowCount | |
| resultDescription | back to summary |
|---|---|
| pack-priv ResultDescription resultDescription | |
| rowsFiltered | back to summary |
|---|---|
| public int rowsFiltered | |
| rowsSeen | back to summary |
|---|---|
| public int rowsSeen | |
| startExecutionTime | back to summary |
|---|---|
| protected long startExecutionTime | |
| statementContext | back to summary |
|---|---|
| private StatementContext statementContext | |
| statisticsTimingOn | back to summary |
|---|---|
| private final boolean statisticsTimingOn | |
| subqueryTrackingArray | back to summary |
|---|---|
| public NoPutResultSet[] subqueryTrackingArray | |
| tc | back to summary |
|---|---|
| private transient TransactionController tc | |
| warnings | back to summary |
|---|---|
| private SQLWarning warnings | |
| BasicNoPutResultSetImpl | back to summary |
|---|---|
| pack-priv BasicNoPutResultSetImpl(ResultDescription resultDescription, Activation activation, double optimizerEstimatedRowCount, double optimizerEstimatedCost) Constructor.
| |
| addWarning | back to summary |
|---|---|
| public final void addWarning(SQLWarning w) Implements org. Doc from org. Add a warning to this result set.
| |
| attachStatementContext | back to summary |
|---|---|
| protected void attachStatementContext() throws StandardException 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.
| |
| checkCancellationFlag | back to summary |
|---|---|
| public void checkCancellationFlag() throws StandardException Checks whether the currently executing statement has been cancelled. This is done by checking the statement's allocated StatementContext object.
| |
| checkRowPosition | back to summary |
|---|---|
| public boolean checkRowPosition(int isType) throws StandardException Implements org. Determine if the cursor is before the first row in the result set.
| |
| childrenToXML | back to summary |
|---|---|
| public static Element childrenToXML(Element outerNode, ResultSet outerRS) throws Exception Pretty-print the inner ResultSet fields inside an outer ResultSet. Returns the outerNode. | |
| cleanUp | back to summary |
|---|---|
| public void cleanUp() throws StandardException Implements org. Clean up on error
| |
| dumpTimeStats | back to summary |
|---|---|
| protected final String dumpTimeStats(String indent, String subIndent) Dump out the time information for run time stats.
| |
| findResultSetFields | back to summary |
|---|---|
| private static void findResultSetFields(ArrayList<Field> fieldList, final Class<?> klass) throws Exception Find all fields of type ResultSet. | |
| finish | back to summary |
|---|---|
| public void finish() throws StandardException Implements org. Doc from org. 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(). Will close the result set if it is not already closed.
| |
| finishAndRTS | back to summary |
|---|---|
protected final void finishAndRTS() throws StandardException
| |
| getAbsoluteRow | back to summary |
|---|---|
| public ExecRow getAbsoluteRow(int row) throws StandardException Implements org. 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.
| |
| getActivation | back to summary |
|---|---|
| public final Activation getActivation() Implements org. | |
| getAutoGeneratedKeysResultset | back to summary |
|---|---|
| public ResultSet getAutoGeneratedKeysResultset() Implements org. Doc from org. ResultSet for rows inserted into the table (contains auto-generated keys columns only)
| |
| getBeginExecutionTimestamp | back to summary |
|---|---|
| public Timestamp getBeginExecutionTimestamp() Implements org. Get the Timestamp for the beginning of execution.
| |
| getCompactRow | back to summary |
|---|---|
| protected ExecRow getCompactRow(ExecRow candidate, FormatableBitSet accessedCols, boolean isKeyed) throws StandardException 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.
| |
| getCurrentTimeMillis | back to summary |
|---|---|
| protected final long getCurrentTimeMillis() Return the current time in milliseconds, if DEBUG and RunTimeStats is on, else return 0. (Only pay price of system call if need to.)
| |
| getElapsedMillis | back to summary |
|---|---|
| protected final long getElapsedMillis(long beginTime) 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.)
| |
| getEndExecutionTimestamp | back to summary |
|---|---|
| public Timestamp getEndExecutionTimestamp() Implements org. Get the Timestamp for the end of execution.
| |
| getEstimatedRowCount | back to summary |
|---|---|
| public double getEstimatedRowCount() Implements org. Doc from org. Get the estimated row count from this result set.
| |
| getExecuteTime | back to summary |
|---|---|
| public long getExecuteTime() Implements org. Get the execution time in milliseconds.
| |
| getExecutionFactory | back to summary |
|---|---|
| pack-priv final ExecutionFactory getExecutionFactory() Get a execution factory
| |
| getFirstRow | back to summary |
|---|---|
| public ExecRow getFirstRow() throws StandardException Implements org. Returns the first row from the query, and returns NULL when there are no rows.
| |
| getLanguageConnectionContext | back to summary |
|---|---|
| protected final LanguageConnectionContext getLanguageConnectionContext() Cache the language connection context. Return it.
| |
| getLastRow | back to summary |
|---|---|
| public ExecRow getLastRow() throws StandardException Implements org. Returns the last row from the query, and returns NULL when there are no rows.
| |
| getNextRow | back to summary |
|---|---|
| public final ExecRow getNextRow() throws StandardException Implements org. 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.
| |
| getNextRowCore | back to summary |
|---|---|
| public abstract ExecRow getNextRowCore() throws StandardException Redeclares org. Doc from org. 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.
| |
| getPointOfAttachment | back to summary |
|---|---|
| public int getPointOfAttachment() Implements org. Doc from org. Return the point of attachment for this subquery. (Only meaningful for Any and Once ResultSets, which can and will only be at the top of a ResultSet for a subquery.)
| |
| getPreviousRow | back to summary |
|---|---|
| public ExecRow getPreviousRow() throws StandardException Implements org. Returns the previous row from the query, and returns NULL when there are no more previous rows.
| |
| getRelativeRow | back to summary |
|---|---|
| public ExecRow getRelativeRow(int row) throws StandardException Implements org. 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.
| |
| getResultDescription | back to summary |
|---|---|
| public ResultDescription getResultDescription() Implements org. Returns the description of the table's rows
| |
| getRowNumber | back to summary |
|---|---|
| public int getRowNumber() Implements org. 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).
| |
| getScanIsolationLevel | back to summary |
|---|---|
| public int getScanIsolationLevel() Implements org. Doc from org. Return the isolation level of the scan in the result set. Only expected to be called for those ResultSets that contain a scan.
| |
| getSubqueryTrackingArray | back to summary |
|---|---|
| public final NoPutResultSet[] getSubqueryTrackingArray(int numSubqueries) Implements org. Doc from org. Get the subquery ResultSet tracking array from the top ResultSet. (Used for tracking open subqueries when closing down on an error.)
| |
| getTransactionController | back to summary |
|---|---|
| pack-priv final TransactionController getTransactionController() Get the current transaction controller. | |
| getWarnings | back to summary |
|---|---|
| public final SQLWarning getWarnings() Implements org. Doc from org. Return the set of warnings generated during the execution of this result set. The warnings are cleared once this call returns.
| |
| isClosed | back to summary |
|---|---|
| public boolean isClosed() Implements org. Report if closed.
| |
| isForUpdate | back to summary |
|---|---|
| public boolean isForUpdate() Implements org. Is this ResultSet or it's source result set for update This method will be overriden in the inherited Classes if it is true
| |
| isXplainOnlyMode | back to summary |
|---|---|
| protected final boolean isXplainOnlyMode() | |
| markAsTopResultSet | back to summary |
|---|---|
| public void markAsTopResultSet() Implements org. Mark the ResultSet as the topmost one in the ResultSet tree. Useful for closing down the ResultSet on an error. | |
| modifiedRowCount | back to summary |
|---|---|
| public final long modifiedRowCount() Implements org. Doc from org. Returns the number of rows affected by the statement. Only valid of returnsRows() returns false. For other DML statements, it returns the number of rows modified by the statement. For statements that do not affect rows (like DDL statements), it returns zero.
| |
| open | back to summary |
|---|---|
| public final void open() throws StandardException Implements org. 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.
| |
| recordConstructorTime | back to summary |
|---|---|
| protected final void recordConstructorTime() Allow sub-classes to record the total time spent in their constructor time. | |
| reopenCore | back to summary |
|---|---|
| public void reopenCore() throws StandardException Implements org. 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.
| |
| requiresRelocking | back to summary |
|---|---|
| public boolean requiresRelocking() Implements org. Doc from org. Do we need to relock the row when going to the heap.
| |
| resultSetNumber | back to summary |
|---|---|
| public int resultSetNumber() Implements org. Doc from org. Get the number of this ResultSet, which is guaranteed to be unique within a statement.
| |
| returnsRows | back to summary |
|---|---|
| public boolean returnsRows() Implements org. Returns true.
| |
| setAfterLastRow | back to summary |
|---|---|
| public ExecRow setAfterLastRow() throws StandardException Implements org. Sets the current position to after the last row and returns NULL because there is no current row.
| |
| setBeforeFirstRow | back to summary |
|---|---|
| public ExecRow setBeforeFirstRow() throws StandardException Implements org. Sets the current position to before the first row and returns NULL because there is no current row.
| |
| setCompactRow | back to summary |
|---|---|
| protected ExecRow setCompactRow(ExecRow candidateRow, ExecRow compactRow) 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. | |
| setCompatRow | back to summary |
|---|---|
| protected final void setCompatRow(ExecRow compactRow, DataValueDescriptor[] sourceRow) | |
| stripPackage | back to summary |
|---|---|
| private static String stripPackage(String className) Strip the package location from a class name | |
| toXML | back to summary |
|---|---|
| public Element toXML(Element parentNode, String tag) throws Exception Implements org. Doc from org. Produce an xml image of this ResultSet and its descendant ResultSets. Appends an element to the parentNode and returns the appended element. | |
| toXML | back to summary |
|---|---|
| public static Element toXML(Element parentNode, String childTag, ResultSet rs) throws Exception Pretty-print a ResultSet as an xml child of a parent node. Return the node representing the ResultSet child. | |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | compare(Field
the first object to be compared. left, Field the second object to be compared. right)Implements java. Compares its two arguments for order. |
| FieldComparator | back to summary |
|---|---|
| public FieldComparator() | |
| compare | back to summary |
|---|---|
| public int compare(Field left, Field right) Implements java. Doc from java. Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
The implementor must ensure that
The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that | |