public interface IndexLookupBatch
addSearchRows(SearchRow, SearchRow)
until method
isBatchFull()
will return true
or there are no more search
rows to add. Then method find()
will be called to execute batched
lookup. Note that a single instance of IndexLookupBatch
can be reused
for multiple sequential batched lookups, moreover it can be reused for
multiple queries for the same prepared statement.Index.createLookupBatch(org.h2.table.TableFilter[], int)
Modifier and Type | Method and Description |
---|---|
boolean |
addSearchRows(SearchRow first,
SearchRow last)
Add search row pair to the batch.
|
List<Future<Cursor>> |
find()
Execute batched lookup and return future cursor for each provided search
row pair.
|
String |
getPlanSQL()
Get plan for EXPLAIN.
|
boolean |
isBatchFull()
Check if this batch is full.
|
void |
reset(boolean beforeQuery)
Reset this batch to clear state.
|
boolean addSearchRows(SearchRow first, SearchRow last)
first
- the first row, or null for no limitlast
- the last row, or null for no limitfalse
if this search row pair is known to produce no
results and thus the given row pair was not addedIndex.find(org.h2.table.TableFilter, SearchRow, SearchRow)
boolean isBatchFull()
true
If batch is full, will not accept any
more rows and find()
can be executed.List<Future<Cursor>> find()
addSearchRows(SearchRow, SearchRow)
calls has been done before
find()
call exactly in the same order.String getPlanSQL()
void reset(boolean beforeQuery)
beforeQuery
- if it is being called before query executionCopyright © 2020 JBoss by Red Hat. All rights reserved.