| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | MVSecondaryIndex.
A cursor. |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final TransactionMap | |
| private final MVTable | mvTable
The multi-value table. |
| Access | Constructor and Description |
|---|---|
| public | MVSecondaryIndex(Database db, MVTable table, int id, String indexName, IndexColumn[] columns, int uniqueColumnCount, IndexType indexType)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | add(SessionLocal
the session to use session, Row the row to add row)Implements abstract org. Add a row to the index. |
| public void | addBufferedRows(List<String>
the names of the temporary storage bufferNames)Implements abstract org. Add all the index data from the buffers to the index. |
| public void | addRowsToBuffer(List<Row>
the rows rows, String the name of the temporary storage bufferName)Implements abstract org. Add the rows to a temporary storage (not to the index yet). |
| public boolean | canFindNext()
Overrides org. Check if the index can get the next higher value. |
| public boolean | canGetFirstOrLast()
Overrides org. Check if the index can directly look up the lowest or highest value of a column. |
| private void | checkUnique(boolean repeatableRead, TransactionMap<SearchRow, Value> map, SearchRow row, long newKey)
|
| public void | close(SessionLocal
the session used to write data session)Implements abstract org. Close this index. |
| private SearchRow | |
| public Cursor | find(SessionLocal
the session session, SearchRow the first row, or null for no limit first, SearchRow the last row, or null for no limit last, boolean if true, iterate in reverse (descending) order reverse)Implements abstract org. Find a row or a list of rows and create a cursor to iterate over the result. |
| private Cursor | |
| public Cursor | findFirstOrLast(SessionLocal
the session session, boolean true if the first (lowest for ascending indexes) or last
value should be returned first)Overrides org. Find the first (or last) value of this index. |
| public Cursor | findNext(SessionLocal
the session session, SearchRow the lower limit (excluding) higherThan, SearchRow the last row, or null for no limit last)Overrides org. Find a row or a list of rows that is larger and create a cursor to iterate over the result. |
| public double | getCost(SessionLocal
the session session, int[] per-column comparison bit masks, null means 'always false',
see constants in IndexCondition masks, TableFilter[] all joined table filters filters, int the current table filter index filter, SortOrder the sort order sortOrder, AllColumnsForPlan the set of all columns allColumnsSet)Implements abstract org. Estimate the cost to search for rows given the search mask. |
| private TransactionMap | |
| public MVMap | |
| public long | getRowCount(SessionLocal
the session session)Implements abstract org. Get the row count of this table, for the given session. |
| public long | getRowCountApproximation(SessionLocal
the session session)Implements abstract org. Get the approximated row count for this table. |
| public MVTable | |
| public boolean | needRebuild()
Implements abstract org. Check if the index needs to be rebuilt. |
| private MVMap | |
| public void | remove(SessionLocal
the session session, Row the row row)Implements abstract org. Remove a row from the index. |
| public void | remove(SessionLocal
the session session)Implements abstract org. Remove the index. |
| private boolean | |
| public void | truncate(SessionLocal
the session session)Implements abstract org. Remove all rows from the index. |
| public void | update(SessionLocal
the session session, Row row before the update oldRow, Row row after the update newRow)Overrides org. Update index after row change. |
| dataMap | back to summary |
|---|---|
| private final TransactionMap<SearchRow, Value> dataMap | |
| mvTable | back to summary |
|---|---|
| private final MVTable mvTable The multi-value table. | |
| MVSecondaryIndex | back to summary |
|---|---|
| public MVSecondaryIndex(Database db, MVTable table, int id, String indexName, IndexColumn[] columns, int uniqueColumnCount, IndexType indexType) | |
| add | back to summary |
|---|---|
| public void add(SessionLocal session, Row row) Implements abstract org. Doc from org. Add a row to the index.
| |
| addBufferedRows | back to summary |
|---|---|
| public void addBufferedRows(List<String> bufferNames) Implements abstract org. Doc from org. Add all the index data from the buffers to the index. The index will typically use merge sort to add the data more quickly in sorted order. | |
| addRowsToBuffer | back to summary |
|---|---|
| public void addRowsToBuffer(List<Row> rows, String bufferName) Implements abstract org. Doc from org. Add the rows to a temporary storage (not to the index yet). The rows are sorted by the index columns. This is to more quickly build the index. | |
| canFindNext | back to summary |
|---|---|
| public boolean canFindNext() Overrides org. Doc from org. Check if the index can get the next higher value.
| |
| canGetFirstOrLast | back to summary |
|---|---|
| public boolean canGetFirstOrLast() Overrides org. Doc from org. Check if the index can directly look up the lowest or highest value of a column.
| |
| checkUnique | back to summary |
|---|---|
| private void checkUnique(boolean repeatableRead, TransactionMap<SearchRow, Value> map, SearchRow row, long newKey) | |
| close | back to summary |
|---|---|
| public void close(SessionLocal session) Implements abstract org. Doc from org. Close this index.
| |
| convertToKey | back to summary |
|---|---|
| private SearchRow convertToKey(SearchRow r, Boolean minMax) | |
| find | back to summary |
|---|---|
| public Cursor find(SessionLocal session, SearchRow first, SearchRow last, boolean reverse) Implements abstract org. Doc from org. Find a row or a list of rows and create a cursor to iterate over the result.
| |
| find | back to summary |
|---|---|
| private Cursor find(SessionLocal session, SearchRow first, boolean bigger, SearchRow last, boolean reverse) | |
| findFirstOrLast | back to summary |
|---|---|
| public Cursor findFirstOrLast(SessionLocal session, boolean first) Overrides org. Doc from org. Find the first (or last) value of this index. The cursor returned is positioned on the correct row, or on null if no row has been found.
| |
| findNext | back to summary |
|---|---|
| public Cursor findNext(SessionLocal session, SearchRow higherThan, SearchRow last) Overrides org. Doc from org. Find a row or a list of rows that is larger and create a cursor to iterate over the result.
| |
| getCost | back to summary |
|---|---|
| public double getCost(SessionLocal session, int[] masks, TableFilter[] filters, int filter, SortOrder sortOrder, AllColumnsForPlan allColumnsSet) Implements abstract org. Doc from org. Estimate the cost to search for rows given the search mask. There is one element per column in the search mask. For possible search masks, see IndexCondition.
| |
| getMap | back to summary |
|---|---|
| private TransactionMap Get the map to store the data.
| |
| getMVMap | back to summary |
|---|---|
| public MVMap Implements abstract org.
| |
| getRowCount | back to summary |
|---|---|
| public long getRowCount(SessionLocal session) Implements abstract org. Doc from org. Get the row count of this table, for the given session.
| |
| getRowCountApproximation | back to summary |
|---|---|
| public long getRowCountApproximation(SessionLocal session) Implements abstract org. Doc from org. Get the approximated row count for this table.
| |
| getTable | back to summary |
|---|---|
| public MVTable getTable() Overrides org. Doc from org. Get the table on which this index is based. | |
| needRebuild | back to summary |
|---|---|
| public boolean needRebuild() Implements abstract org. Doc from org. Check if the index needs to be rebuilt. This method is called after opening an index.
| |
| openMap | back to summary |
|---|---|
| private MVMap | |
| remove | back to summary |
|---|---|
| public void remove(SessionLocal session, Row row) Implements abstract org. Doc from org. Remove a row from the index.
| |
| remove | back to summary |
|---|---|
| public void remove(SessionLocal session) Implements abstract org. Doc from org. Remove the index.
| |
| rowsAreEqual | back to summary |
|---|---|
| private boolean rowsAreEqual(SearchRow rowOne, SearchRow rowTwo) | |
| truncate | back to summary |
|---|---|
| public void truncate(SessionLocal session) Implements abstract org. Doc from org. Remove all rows from the index.
| |
| update | back to summary |
|---|---|
| public void update(SessionLocal session, Row oldRow, Row newRow) Overrides org. Doc from org. Update index after row change.
| |
| Modifier and Type | Field and Description |
|---|---|
| private SearchRow | |
| private final TransactionMap. | |
| private final MVTable | |
| private Row | |
| private final SessionLocal |
| Access | Constructor and Description |
|---|---|
| pack-priv | MVStoreCursor(SessionLocal session, TransactionMap.
|
| Modifier and Type | Method and Description |
|---|---|
| public Row | |
| public SearchRow | |
| public boolean | |
| public boolean |
| current | back to summary |
|---|---|
| private SearchRow current | |
| it | back to summary |
|---|---|
| private final TransactionMap. | |
| mvTable | back to summary |
|---|---|
| private final MVTable mvTable | |
| row | back to summary |
|---|---|
| private Row row | |
| session | back to summary |
|---|---|
| private final SessionLocal session | |
| MVStoreCursor | back to summary |
|---|---|
| pack-priv MVStoreCursor(SessionLocal session, TransactionMap. | |
| get | back to summary |
|---|---|
| public Row get() Implements org. Doc from org. Get the complete current row. All column are available. | |
| getSearchRow | back to summary |
|---|---|
| public SearchRow getSearchRow() Implements org. Doc from org. Get the current row. Only the data for indexed columns is available in this row. | |
| next | back to summary |
|---|---|
| public boolean next() Implements org. Doc from org. Skip to the next row if one is available.
| |
| previous | back to summary |
|---|---|
| public boolean previous() Implements org. Doc from org. Skip to the previous row if one is available. No filtering is made here.
| |
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv SearchRow | |
| private final Iterator |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public SearchRow |
| currentRowData | back to summary |
|---|---|
| pack-priv SearchRow currentRowData | |
| iterator | back to summary |
|---|---|
| private final Iterator<SearchRow> iterator | |
| Source | back to summary |
|---|---|
| public Source(Iterator<SearchRow> iterator) | |
| hasNext | back to summary |
|---|---|
| public boolean hasNext() | |
| next | back to summary |
|---|---|
| public SearchRow next() | |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | compare(MVSecondaryIndex.
the first object to be compared. one,the second object to be compared. twoImplements java. Compares its two arguments for order. |
| type | back to summary |
|---|---|
| private final DataType<SearchRow> type | |
| Comparator | back to summary |
|---|---|
| public Comparator(DataType<SearchRow> type) | |
| compare | back to summary |
|---|---|
| public int compare(MVSecondaryIndex. 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
| |