| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | MVPrimaryIndex.
A cursor. |
| Modifier and Type | Field and Description |
|---|---|
| private final TransactionMap | |
| private final AtomicLong | |
| private int | |
| private final String | |
| private final MVTable |
| Access | Constructor and Description |
|---|---|
| public |
| 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 | canGetFirstOrLast()
Overrides org. Check if the index can directly look up the lowest or highest value of a column. |
| public void | close(SessionLocal
the session used to write data session)Implements abstract org. Close this index. |
| 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. |
| 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 int | getColumnIndex(Column
the column col)Overrides org. Get the index of a column in the list of index columns |
| 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. |
| public String | |
| public int | |
| pack-priv TransactionMap | |
| public String | |
| public MVMap | |
| public String | getPlanSQL()
Overrides org. Get the message to show in a EXPLAIN statement. |
| public Row | getRow(SessionLocal
the session session, long the unique key key)Overrides org. Get the row with the given key. |
| 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 long | Returns: the maximum number of rowsThe maximum number of rows, including uncommitted rows of any session. |
| public MVTable | |
| public boolean | isFirstColumn(Column
the column column)Overrides org. Check if the given column is the first for this index |
| public boolean | |
| pack-priv Row | Returns: row object if it existsdatabase session session, Row to lock row, int timeout in milliseconds, timeoutMillis)-1 for default, -2 to
skip locking if row is already locked by another sessionLock a single row. |
| private Row | |
| public boolean | needRebuild()
Implements abstract org. Check if the index needs to be rebuilt. |
| 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. |
| public void | |
| private static Row | |
| 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<Long, SearchRow> dataMap | |
| lastKey | back to summary |
|---|---|
| private final AtomicLong lastKey | |
| mainIndexColumn | back to summary |
|---|---|
| private int mainIndexColumn | |
| mapName | back to summary |
|---|---|
| private final String mapName | |
| mvTable | back to summary |
|---|---|
| private final MVTable mvTable | |
| MVPrimaryIndex | back to summary |
|---|---|
| public MVPrimaryIndex(Database db, MVTable table, int id, IndexColumn[] columns, 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. | |
| 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.
| |
| close | back to summary |
|---|---|
| public void close(SessionLocal session) Implements abstract org. Doc from org. Close this index.
| |
| 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.
| |
| 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.
| |
| getColumnIndex | back to summary |
|---|---|
| public int getColumnIndex(Column col) Overrides org. Doc from org. Get the index of a column in the list of index columns | |
| 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.
| |
| getCreateSQL | back to summary |
|---|---|
| public String getCreateSQL() Overrides org. Doc from org. Construct the CREATE ... SQL statement for this object. | |
| getMainIndexColumn | back to summary |
|---|---|
| public int getMainIndexColumn() | |
| getMap | back to summary |
|---|---|
| pack-priv TransactionMap Get the map to store the data.
| |
| getMapName | back to summary |
|---|---|
| public String getMapName() | |
| getMVMap | back to summary |
|---|---|
| public MVMap Implements abstract org.
| |
| getPlanSQL | back to summary |
|---|---|
| public String getPlanSQL() Overrides org. Doc from org. Get the message to show in a EXPLAIN statement. | |
| getRow | back to summary |
|---|---|
| public Row getRow(SessionLocal session, long key) Overrides org. Doc from org. Get the row with the given key.
| |
| 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.
| |
| getRowCountMax | back to summary |
|---|---|
| public long getRowCountMax() The maximum number of rows, including uncommitted rows of any session.
| |
| getTable | back to summary |
|---|---|
| public MVTable getTable() Overrides org. Doc from org. Get the table on which this index is based. | |
| isFirstColumn | back to summary |
|---|---|
| public boolean isFirstColumn(Column column) Overrides org. Doc from org. Check if the given column is the first for this index | |
| isRowIdIndex | back to summary |
|---|---|
| public boolean isRowIdIndex() Overrides org. Doc from org. Does this index support lookup by row id?
| |
| lockRow | back to summary |
|---|---|
| pack-priv Row lockRow(SessionLocal session, Row row, int timeoutMillis) Lock a single row.
| |
| lockRow | back to summary |
|---|---|
| private Row lockRow(TransactionMap<Long, SearchRow> map, long key, int timeoutMillis) | |
| 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.
| |
| 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.
| |
| setMainIndexColumn | back to summary |
|---|---|
| public void setMainIndexColumn(int mainIndexColumn) | |
| setRowKey | back to summary |
|---|---|
| private static Row setRowKey(Row row, long key) | |
| 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 Map. | |
| private final TransactionMap. | |
| private Row |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Row | |
| public SearchRow | |
| public boolean | |
| public boolean |
| current | back to summary |
|---|---|
| private Map. | |
| it | back to summary |
|---|---|
| private final TransactionMap. | |
| row | back to summary |
|---|---|
| private Row row | |
| MVStoreCursor | back to summary |
|---|---|
| public MVStoreCursor(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.
| |