An Index object also holds information on table columns (in the form of int indexes) that are covered by it.
New class derived from Hypersonic SQL code and enhanced in HSQLDB.
| Modifier and Type | Class and Description |
|---|---|
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| private Index. | |
| private final boolean[] | |
| private final boolean[] | |
| pack-priv final int[] | |
| pack-priv final Type[] | |
| private final int[] | |
| private boolean | |
| protected final boolean | |
| private final boolean | |
| protected final boolean | |
| pack-priv final boolean | |
| pack-priv final boolean | |
| protected final boolean | |
| protected final HsqlNameManager. | |
| pack-priv Object[] | |
| private final boolean[] | |
| private final long | |
| pack-priv int | |
| protected TableBase |
| Access | Constructor and Description |
|---|---|
| public | IndexAVL(HsqlNameManager.
HsqlName of the index name,persistnece id id, TableBase table of the index table, int[] array of column indexes columns, boolean[] boolean[] descending, boolean[] boolean[] nullsLast, Type[] array of column types colTypes, boolean if index is for a primary key pk, boolean is this a unique index unique, boolean does this index belonging to a constraint constraint, boolean is this an auto-index for an FK that refers to a table
defined after this table forward)Constructor declaration |
| Modifier and Type | Method and Description |
|---|---|
| public Index. | |
| pack-priv void | balance(PersistentStore store, NodeAVL x, boolean isleft)
Balances part of the tree after an alteration to the index. |
| pack-priv int | |
| public int | |
| public void | |
| pack-priv int | Returns: comparison result, -1,0,+1Session session, Row data newRow, Row data existingRow, boolean boolean useRowId, int int start)Compare two rows of the table for inserting rows into unique indexes Supports descending columns. |
| public int | Returns: comparison result, -1,0,+1Session session, Object[] row from another table a, Object[] a full row in this table b, int[] column indexes in the other table rowColMap)Implements org. Compares two table rows based on the columns of this index. |
| public int | compareRowNonUnique(Session session, Object[] a, Object[] b, int[] rowColMap, int fieldCount)
Implements org.
|
| public int | compareRowNonUnique(Session session, Object[] a, Object[] b, int fieldCount)
Implements org. As above but use the index column data |
| public void | |
| public boolean | existsParent(Session session, PersistentStore store, Object[] rowdata, int[] rowColMap)
Implements org.
|
| pack-priv NodeAVL | findDistinctNode(Session session, PersistentStore store, NodeAVL node, int fieldCount, boolean reversed)
|
| public RowIterator | Returns: iteratorsession object session, PersistentStore store object store, Object[] array containing index column data rowdata, int count of columns to match matchCount, int int distinctCount, int int compareType, boolean boolean reversed, boolean[] boolean[] map)Implements org. Return the first node equal to the indexdata object. |
| public RowIterator | Returns: iteratorsession object session, PersistentStore store object store, Object[] array containing table row data rowdata)Implements org. Return the first node equal to the rowdata object. |
| public RowIterator | Returns: iteratorsession object session, PersistentStore store object store, Object[] array containing table row data rowdata, int[] int[] rowColMap)Implements org. Return the first node equal to the rowdata object. |
| public RowIterator | Returns: iteratorSession session, PersistentStore PersistentStore store)Implements org. Finds the first node where the data is not null. |
| pack-priv NodeAVL | Returns: matching node or nullSession session, PersistentStore PersistentStore store, Object[] array containing data for the index columns rowdata, int[] map of the data to columns rowColMap, int int fieldCount, int int compareType, int int readMode, boolean boolean reversed)Finds a match with a row from a different table |
| public RowIterator | Returns: Iterator for first rowImplements org. Returns the row for the first node of the index |
| public RowIterator | |
| pack-priv NodeAVL | |
| public HsqlNameManager. | |
| public long | |
| public int | getColumnCount()
Implements org. Returns the count of visible columns used |
| public boolean[] | getColumnDesc()
Implements org. Returns the array containing desc column flags |
| public int[] | getColumns()
Implements org. Returns the array containing column indexes for index |
| public Type[] | getColumnTypes()
Implements org. Returns the array containing column indexes for index |
| public int[] | getDefaultColumnMap()
Implements org. Returns the array containing 0, 1, ... |
| public int | Returns: ordinal valueImplements org. Returns a value indicating the order of different types of index in the list of indexes for a table. |
| pack-priv RowIterator | |
| public HsqlNameManager. | |
| public Grantee | |
| public long | |
| public int | |
| public HsqlNameManager. | |
| public String | |
| public TableBase | |
| public int | |
| pack-priv boolean | |
| public void | insert(Session session, PersistentStore store, Row row)
Implements org. Insert a node into the index |
| public boolean | |
| public boolean | isConstraint()
Implements org. Does this index belong to a constraint? |
| public boolean | |
| pack-priv boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| pack-priv NodeAVL | |
| pack-priv NodeAVL | |
| public RowIterator | Returns: last rowImplements org. Returns the row for the last node of the index |
| pack-priv NodeAVL | next(Session session, PersistentStore store, NodeAVL x, int distinctCount)
Returns the node after the given one |
| pack-priv NodeAVL | |
| pack-priv NodeAVL | |
| private NodeAVL | |
| pack-priv int | |
| public double[] | |
| public void | |
| public void | |
| public void | |
| public long | size(Session session, PersistentStore store)
Implements org. Returns the node count. |
| public long | |
| public void |