Since it retrieves rows in bulk, locking is not as is usual -- locks may have already been released on rows as they are returned to the user. Hence, this ResultSet is not suitable for a query running Isolation Level 1, cursor stability.
Note that this code is only accessable from an optimizer override. If it makes sense to have the optimizer select bulk reads, then this should probably be rolled into TableScanResultSet.
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private int | |
| private int | |
| private static int | |
| private int | |
| private DataValueDescriptor[][] | |
| private RowLocation[] |
| Access | Constructor and Description |
|---|---|
| pack-priv | BulkTableScanResultSet(long conglomId, StaticCompiledOpenConglomInfo scoci, Activation activation, int resultRowTemplate, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchOperator, boolean sameStartStopPosition, Qualifier[][] qualifiers, String tableName, String userSuppliedOptimizerOverrides, String indexName, boolean isConstraint, boolean forUpdate, int colRefItem, int indexColItem, int lockMode, boolean tableLocked, int isolationLevel, int rowsPerRead, boolean disableForHoldable, boolean oneRowScan, double optimizerEstimatedRowCount, double optimizerEstimatedCost)
Constructor. |
| Modifier and Type | Method and Description |
|---|---|
| private static int | Returns: the bulk fetch size to usethe activation for the executing statement activation, int how many rows to read in each chunk if a bulk fetch
is OK to use rowsPerRead, boolean whether or not bulk fetch should be disabled
for holdable cursors disableForHoldable)Adjust the bulk fetch size according to the parameters. |
| protected boolean | canGetInstantaneousLocks()
Overrides org. Can we get instantaneous locks when getting share row locks at READ COMMITTED. |
| public void | close()
Overrides org. Implements org. If the result set has been opened, close the open scan. |
| public ExecRow | getNextRowCore()
Overrides org. Implements org. Return the next row (if any) from the scan (if open). |
| private DataValueDescriptor[] | lopOffRowLocation()
Get a blank row by cloning the candidate row and lopping off the trailing RowLocation column for scans done on behalf of MERGE statements. |
| public void | openCore()
Overrides org. Implements org. Open up the result set. |
| protected void | openScanController(TransactionController
transaction controller will open one if null tc)Overrides org. Open the scan controller |
| private int | |
| public void | reopenCore()
Overrides org. Implements org. Reopen the result set. |
| public boolean | requiresRelocking()
Overrides org. Implements org. Do we need to relock the row when going to the heap. |
| baseColumnCount | back to summary |
|---|---|
| private int baseColumnCount | |
| curRowPosition | back to summary |
|---|---|
| private int curRowPosition | |
| numRowsInArray | back to summary |
|---|---|
| private int numRowsInArray | |
| OUT_OF_ROWS | back to summary |
|---|---|
| private static int OUT_OF_ROWS | |
| resultColumnCount | back to summary |
|---|---|
| private int resultColumnCount | |
| rowArray | back to summary |
|---|---|
| private DataValueDescriptor[][] rowArray | |
| rowLocations | back to summary |
|---|---|
| private RowLocation[] rowLocations | |
| BulkTableScanResultSet | back to summary |
|---|---|
| pack-priv BulkTableScanResultSet(long conglomId, StaticCompiledOpenConglomInfo scoci, Activation activation, int resultRowTemplate, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchOperator, boolean sameStartStopPosition, Qualifier[][] qualifiers, String tableName, String userSuppliedOptimizerOverrides, String indexName, boolean isConstraint, boolean forUpdate, int colRefItem, int indexColItem, int lockMode, boolean tableLocked, int isolationLevel, int rowsPerRead, boolean disableForHoldable, boolean oneRowScan, double optimizerEstimatedRowCount, double optimizerEstimatedCost) throws StandardException Constructor. Just save off the rowsPerRead argument and pass everything else down to TableScanResultSet
| |
| adjustBulkFetchSize | back to summary |
|---|---|
| private static int adjustBulkFetchSize(Activation activation, int rowsPerRead, boolean disableForHoldable) Adjust the bulk fetch size according to the parameters. Bulk fetch may be disabled by returning 1 from this method. Disabling of bulk fetch may happen if the cursor is holdable and it contains LOB columns (DERBY-1511) because
| |
| canGetInstantaneousLocks | back to summary |
|---|---|
| protected boolean canGetInstantaneousLocks() Overrides org. Can we get instantaneous locks when getting share row locks at READ COMMITTED. | |
| close | back to summary |
|---|---|
| public void close() throws StandardException Overrides org. Implements org. If the result set has been opened, close the open scan. Delegate most of the work to TableScanResultSet.
| |
| getNextRowCore | back to summary |
|---|---|
| public ExecRow getNextRowCore() throws StandardException Overrides org. Implements org. Return the next row (if any) from the scan (if open). Reload the rowArray as necessary.
| |
| lopOffRowLocation | back to summary |
|---|---|
| private DataValueDescriptor[] lopOffRowLocation() throws StandardException Get a blank row by cloning the candidate row and lopping off the trailing RowLocation column for scans done on behalf of MERGE statements. | |
| openCore | back to summary |
|---|---|
| public void openCore() throws StandardException Overrides org. Implements org. Open up the result set. Delegate
most work to TableScanResultSet.openCore().
Create a new array with | |
| openScanController | back to summary |
|---|---|
| protected void openScanController(TransactionController tc) throws StandardException Overrides org. Open the scan controller
| |
| reloadArray | back to summary |
|---|---|
| private int reloadArray() throws StandardException | |
| reopenCore | back to summary |
|---|---|
| public void reopenCore() throws StandardException Overrides org. Implements org. Reopen the result set. Delegate most work to TableScanResultSet.reopenCore(). Reuse the array of rows.
| |
| requiresRelocking | back to summary |
|---|---|
| public boolean requiresRelocking() Overrides org. Implements org. Doc from org. Do we need to relock the row when going to the heap.
| |