+-------------------------------+ | KEY | +-------------------------------+ | Row | +-------------------------------+where key is the position of the row in the result set and row is the data. And for updatable result sets it will contain:
+-------------------------------+ | KEY | [0] +-------------------------------+ | RowLocation | [POS_ROWLOCATION] +-------------------------------+ | Deleted | [POS_ROWDELETED] +-------------------------------+ | Updated | [POS_ROWUPDATED] +-------------------------------+ | Row | [extraColumns ... n] +-------------------------------+where key is the position of the row in the result set, rowLocation is the row location of that row in the Heap, Deleted indicates whether the row has been deleted, Updated indicates whether the row has been updated, and row is the data.
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private boolean | |
| private int | |
| private int | |
| private BackingStoreHashtable | |
| private boolean | |
| private static final int | |
| private int | |
| private long | |
| private boolean | |
| public int | |
| public int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private SQLInteger | |
| private int | |
| private ExecRow | |
| private boolean | |
| private boolean | |
| public NoPutResultSet | |
| private int | |
| private CursorResultSet |
| Access | Constructor and Description |
|---|---|
| public | ScrollInsensitiveResultSet(NoPutResultSet
The NoPutResultSet from which to get rows
to scroll through source, Activation The activation for this execution activation, int The resultSetNumber resultSetNumber, int # of columns in the source row sourceRowWidth, double optimizerEstimatedRowCount, double optimizerEstimatedCost)Constructor for a ScrollInsensitiveResultSet |
| Modifier and Type | Method and Description |
|---|---|
| private void | addRowToHashTable(ExecRow
The row to add. sourceRow, int The key position, RowLocation The rowLocation of the row to add. rowLoc, boolean Indicates whether the row has been updated. rowUpdated)Add a row to the backing hash table, keyed on position. |
| 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)Overrides org. Implements org. Determine if the cursor is before the first row in the result set. |
| public void | close()
Overrides org. Implements org. If the result set has been opened, close the open scan. |
| public void | finish()
Overrides org. 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(). |
| public ExecRow | Returns: The row at the absolute position, or NULL if no such position.The position. row)Overrides org. Implements org. Returns the row at the absolute position from the query, and returns NULL when there is no such position. |
| public ExecRow | Returns: the last row returned.Implements org. Gets information from last getNextRow call. |
| private DataValueDescriptor[] | |
| public ExecRow | Returns: The first row, or NULL if no rows.Overrides org. Implements org. Returns the first row from the query, and returns NULL when there are no rows. |
| public ExecRow | Returns: The last row, or NULL if no rows.Overrides org. Implements org. Returns the last row from the query, and returns NULL when there are no rows. |
| public ExecRow | getNextRowCore()
Implements abstract org. Implements org. Return the requested values computed from the next row (if any) for which the restriction evaluates to true. |
| private ExecRow | |
| public ExecRow | Returns: The previous row, or NULL if no more previous rows.Overrides org. 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)Overrides org. Implements org. Returns the row at the relative position from the current cursor position, and returns NULL when there is no such position. |
| private DataValueDescriptor[] | Returns: The row data at that position.The specified position. position)Get the row data at the specified position from the hash table. |
| private ExecRow | Returns: The row at that position.The specified position. position)Get the row at the specified position from the hash table. |
| public RowLocation | Returns: the row location of the current cursor row.Implements org. Gets information from its source. |
| public int | Returns: the row number, or 0 if not on a rowOverrides org. Implements org. Returns the row number of the current row. |
| public long | Returns: long The total amount of time spent (in milliseconds).CURRENT_RESULTSET_ONLY - time spent only in this ResultSet
ENTIRE_RESULTSET_TREE - time spent in this ResultSet and below. type)Implements org. Return the total amount of time spent in this ResultSet |
| public boolean | Returns: True if the row has been deleted, otherwise falseReturns TRUE if the row was been deleted within the transaction, otherwise returns FALSE |
| public boolean | isForUpdate()
Overrides org. 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 |
| public boolean | Returns: True if the row has been deleted, otherwise falseReturns TRUE if the row was been updated within the transaction, otherwise returns FALSE |
| public void | markRowAsDeleted()
Overrides org. Implements org. Marks the resultSet's currentRow as deleted after a delete has been issued by either by using positioned delete or JDBC's deleteRow method. |
| public void | openCore()
Implements org. open a scan on the source. |
| private void | |
| public void | reopenCore()
Overrides org. Implements org. reopen a scan on the table. |
| public ExecRow | Returns: NULL.Overrides org. Implements org. Sets the current position to after the last row and returns NULL because there is no current row. |
| public ExecRow | Returns: NULL.Overrides org. Implements org. Sets the current position to before the first row and returns NULL because there is no current row. |
| public void | updateRow(ExecRow
new values for the currentRow row, RowChanger 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. rowChanger)Overrides org. Implements org. 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. |
| afterLast | back to summary |
|---|---|
| private boolean afterLast | |
| beforeFirst | back to summary |
|---|---|
| private boolean beforeFirst | |
| currentPosition | back to summary |
|---|---|
| private int currentPosition | |
| extraColumns | back to summary |
|---|---|
| private int extraColumns | |
| ht | back to summary |
|---|---|
| private BackingStoreHashtable ht | |
| keepAfterCommit | back to summary |
|---|---|
| private boolean keepAfterCommit | |
| LAST_EXTRA_COLUMN | back to summary |
|---|---|
| private static final int LAST_EXTRA_COLUMN | |
| lastPosition | back to summary |
|---|---|
| private int lastPosition | |
| maxRows | back to summary |
|---|---|
| private long maxRows | |
| needsRepositioning | back to summary |
|---|---|
| private boolean needsRepositioning | |
| numFromHashTable | back to summary |
|---|---|
| public int numFromHashTable | |
| numToHashTable | back to summary |
|---|---|
| public int numToHashTable | |
| POS_ROWDELETED | back to summary |
|---|---|
| private static final int POS_ROWDELETED | |
| POS_ROWLOCATION | back to summary |
|---|---|
| private static final int POS_ROWLOCATION | |
| POS_ROWUPDATED | back to summary |
|---|---|
| private static final int POS_ROWUPDATED | |
| positionInHashTable | back to summary |
|---|---|
| private SQLInteger positionInHashTable | |
| positionInSource | back to summary |
|---|---|
| private int positionInSource | |
| resultRow | back to summary |
|---|---|
| private ExecRow resultRow | |
| seenFirst | back to summary |
|---|---|
| private boolean seenFirst | |
| seenLast | back to summary |
|---|---|
| private boolean seenLast | |
| source | back to summary |
|---|---|
| public NoPutResultSet source | |
| sourceRowWidth | back to summary |
|---|---|
| private int sourceRowWidth | |
| target | back to summary |
|---|---|
| private CursorResultSet target | |
| ScrollInsensitiveResultSet | back to summary |
|---|---|
| public ScrollInsensitiveResultSet(NoPutResultSet source, Activation activation, int resultSetNumber, int sourceRowWidth, double optimizerEstimatedRowCount, double optimizerEstimatedCost) throws StandardException Constructor for a ScrollInsensitiveResultSet
| |
| addRowToHashTable | back to summary |
|---|---|
| private void addRowToHashTable(ExecRow sourceRow, int position, RowLocation rowLoc, boolean rowUpdated) throws StandardException Add a row to the backing hash table, keyed on position. When a row gets updated when using scrollable insensitive updatable result sets, the old entry for the row will be deleted from the hash table and this method will be called to add the new values for the row to the hash table, with the parameter rowUpdated = true so as to mark the row as updated. The latter is done in order to implement detectability of own changes for result sets of this type.
| |
| checkRowPosition | back to summary |
|---|---|
| public boolean checkRowPosition(int isType) throws StandardException Overrides org. Implements org. Determine if the cursor is before the first row in the result set.
| |
| close | back to summary |
|---|---|
| public void close() throws StandardException Overrides org. Implements org. If the result set has been opened, close the open scan.
| |
| finish | back to summary |
|---|---|
| public void finish() throws StandardException Overrides org. 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.
| |
| getAbsoluteRow | back to summary |
|---|---|
| public ExecRow getAbsoluteRow(int row) throws StandardException Overrides org. 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.
| |
| getCurrentRow | back to summary |
|---|---|
| public ExecRow getCurrentRow() throws StandardException Implements org. Gets information from last getNextRow call.
| |
| getCurrentRowFromHashtable | back to summary |
|---|---|
| private DataValueDescriptor[] getCurrentRowFromHashtable() throws StandardException Get the column array from the current position in the hash table | |
| getFirstRow | back to summary |
|---|---|
| public ExecRow getFirstRow() throws StandardException Overrides org. Implements org. Returns the first row from the query, and returns NULL when there are no rows.
| |
| getLastRow | back to summary |
|---|---|
| public ExecRow getLastRow() throws StandardException Overrides org. Implements org. Returns the last row from the query, and returns NULL when there are no rows.
| |
| getNextRowCore | back to summary |
|---|---|
| public ExecRow getNextRowCore() throws StandardException Implements abstract org. Implements 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.
| |
| getNextRowFromSource | back to summary |
|---|---|
| private ExecRow getNextRowFromSource() throws StandardException | |
| getPreviousRow | back to summary |
|---|---|
| public ExecRow getPreviousRow() throws StandardException Overrides org. 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 Overrides org. 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.
| |
| getRowArrayFromHashTable | back to summary |
|---|---|
| private DataValueDescriptor[] getRowArrayFromHashTable(int position) throws StandardException Get the row data at the specified position from the hash table.
| |
| getRowFromHashTable | back to summary |
|---|---|
| private ExecRow getRowFromHashTable(int position) throws StandardException Get the row at the specified position from the hash table.
| |
| getRowLocation | back to summary |
|---|---|
| public RowLocation getRowLocation() throws StandardException Implements org. Gets information from its source. We might want to have this take a CursorResultSet in its constructor some day, instead of doing a cast here?
| |
| getRowNumber | back to summary |
|---|---|
| public int getRowNumber() Overrides org. 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).
| |
| getTimeSpent | back to summary |
|---|---|
| public long getTimeSpent(int type) Implements org. Return the total amount of time spent in this ResultSet
| |
| isDeleted | back to summary |
|---|---|
| public boolean isDeleted() throws StandardException Returns TRUE if the row was been deleted within the transaction, otherwise returns FALSE
| |
| isForUpdate | back to summary |
|---|---|
| public boolean isForUpdate() Overrides org. Implements org. Doc from 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
| |
| isUpdated | back to summary |
|---|---|
| public boolean isUpdated() throws StandardException Returns TRUE if the row was been updated within the transaction, otherwise returns FALSE
| |
| markRowAsDeleted | back to summary |
|---|---|
| public void markRowAsDeleted() throws StandardException Overrides org. Implements org. Doc from org. Marks the resultSet's currentRow as deleted after a delete has been issued by either by using positioned delete or JDBC's deleteRow method.
| |
| openCore | back to summary |
|---|---|
| public void openCore() throws StandardException Implements org. open a scan on the source. scan parameters are evaluated at each open, so there is probably some way of altering their values...
| |
| positionInLastFetchedRow | back to summary |
|---|---|
| private void positionInLastFetchedRow() throws StandardException Positions the cursor in the last fetched row. This is done before navigating to a row that has not previously been fetched, so that getNextRowCore() will re-start from where it stopped. | |
| reopenCore | back to summary |
|---|---|
| public void reopenCore() throws StandardException Overrides org. Implements org. reopen a scan on the table. scan parameters are evaluated at each open, so there is probably some way of altering their values...
| |
| setAfterLastRow | back to summary |
|---|---|
| public ExecRow setAfterLastRow() throws StandardException Overrides org. 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() Overrides org. Implements org. Sets the current position to before the first row and returns NULL because there is no current row.
| |
| updateRow | back to summary |
|---|---|
| public void updateRow(ExecRow row, RowChanger rowChanger) throws StandardException Overrides org. Implements org. Doc from org. 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.
| |