private void requestNextBatch() throws SQLException { requestBatchAndWait(highestRowNumber + 1); }
private void requestNextBatch() throws SQLException { requestBatchAndWait(highestRowNumber + 1); }
/** * Moving forward through the results it's expected that the batches are arbitrarily size. * Moving backward through the results it's expected that the batches will match the fetch size. */ public List<?> getCurrentRow() throws SQLException { if (currentRow != null) { return currentRow; } if (this.currentRowNumber == 0 || (lastRowNumber != -1 && this.currentRowNumber > lastRowNumber)) { return null; } for (int i = 0; i < batches.size(); i++) { Batch batch = batches.get(i); if (this.currentRowNumber < batch.getBeginRow()) { continue; } if (this.currentRowNumber > batch.getEndRow()) { continue; } if (i != 0) { batches.add(0, batches.remove(i)); } setCurrentRow(batch); return currentRow; } requestBatchAndWait(this.currentRowNumber); Batch batch = batches.get(0); setCurrentRow(batch); return currentRow; }
/** * Moving forward through the results it's expected that the batches are arbitrarily size. * Moving backward through the results it's expected that the batches will match the fetch size. */ public List<?> getCurrentRow() throws SQLException { if (currentRow != null) { return currentRow; } if (this.currentRowNumber == 0 || (lastRowNumber != -1 && this.currentRowNumber > lastRowNumber)) { return null; } for (int i = 0; i < batches.size(); i++) { Batch batch = batches.get(i); if (this.currentRowNumber < batch.getBeginRow()) { continue; } if (this.currentRowNumber > batch.getEndRow()) { continue; } if (i != 0) { batches.add(0, batches.remove(i)); } setCurrentRow(batch); return currentRow; } requestBatchAndWait(this.currentRowNumber); Batch batch = batches.get(0); setCurrentRow(batch); return currentRow; }
requestBatchAndWait(row + offset); requestBatchAndWait(Integer.MAX_VALUE);
requestBatchAndWait(row + offset); requestBatchAndWait(Integer.MAX_VALUE);