| Modifier and Type | Class and Description |
|---|---|
| public static class | IndexImpl.
Information about a foreign key reference defined in an index (when referential integrity should be enforced). |
| Modifier and Type | Field and Description |
|---|---|
| private static final byte | CASCADE_DELETES_FLAG
flag for indicating that deletes should cascade in a foreign key index |
| private static final byte | CASCADE_NULL_FLAG
flag for indicating that deletes should cascade a null in a foreign key index |
| private static final byte | CASCADE_UPDATES_FLAG
flag for indicating that updates should cascade in a foreign key index |
| private final IndexData | data
the actual data backing this index (more than one index may be backed by the same data |
| pack-priv static final byte | FK_PRIMARY_TABLE_TYPE
index table type for the "primary" table in a foreign key index |
| pack-priv static final byte | FK_SECONDARY_TABLE_TYPE
index table type for the "secondary" table in a foreign key index |
| public static final byte | FOREIGN_KEY_INDEX_TYPE
index type for foreign key indexes |
| private final int | indexNumber
0-based index number |
| private final byte | indexType
the type of the index |
| private static final int | INVALID_INDEX_NUMBER
indicate an invalid index number for foreign key field |
| pack-priv static final Logger | |
| private String | name
Index name |
| public static final byte | PRIMARY_KEY_INDEX_TYPE
index type for primary key indexes |
| private final IndexImpl. | reference
foreign key reference info, if any |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public int | compareTo(IndexImpl other)
Implements java. Compares this object with the specified object for order. |
| public Object[] | Returns: the appropriate sparse array of data ornull if not all columns for this index were providedConstructs an array of values appropriate for this index from the given column value. |
| public Object[] | Returns: the appropriate sparse array of data ornull if not all columns for this index were providedConstructs an array of values appropriate for this index from the given column values. |
| public Object[] | Returns: the appropriate sparse array of dataConstructs an array of values appropriate for this index from the given column values, expected to match the columns for this index. |
| public Object[] | Returns: the appropriate sparse array of data ornull if no prefix list of columns for this index were
providedConstructs an array of values appropriate for this index from the given column value, which must be the first column of the index. |
| public Object[] | Returns: the appropriate sparse array of data ornull if no prefix list of columns for this index were
providedConstructs an array of values appropriate for this index from the given column values, possibly only using a subset of the given values. |
| public Object[] | Returns: the appropriate sparse array of dataConstructs an array of values appropriate for this index from the given column values, possibly only providing a prefix subset of the index columns (at least one value must be provided). |
| public IndexData. | |
| public IndexData. | cursor(Object[]
the first row of data for the cursor, or startRow, boolean null for the first entrywhether or not startRow is inclusive or exclusive startInclusive, Object[] the last row of data for the cursor, or endRow, boolean null for the last entrywhether or not endRow is inclusive or exclusive endInclusive)Gets a new cursor for this index, narrowed to the range defined by the given startRow and endRow. |
| public int | getColumnCount()
Implements io. Returns the number of columns covered by this index. |
| public List | getColumns()
Implements io. Returns the Columns for this index (unmodifiable). |
| public JetFormat | |
| public IndexData | |
| public byte | |
| public int | |
| public String | |
| public PageChannel | |
| public IndexImpl. | |
| public IndexImpl | getReferencedIndex()
Implements io. Returns the Index referenced by this Index's ForeignKeyReference (if it has one), otherwise |
| public TableImpl | getTable()
Implements io. Returns the table to which this index belongs. |
| public int | |
| public int | |
| public void | |
| public boolean | isForeignKey()
Implements io. Returns |
| public boolean | |
| public boolean | isPrimaryKey()
Implements io. Returns |
| public boolean | isRequired()
Implements io. Whether or not values are required for index columns. |
| public boolean | isUnique()
Implements io. Whether or not index entries must be unique. |
| public CursorBuilder | newCursor()
Implements io. Convenience method for constructing a new CursorBuilder for this Index. |
| pack-priv void | |
| public boolean | shouldIgnoreNulls()
Implements io. Whether or not |
| public String | |
| private String | |
| private static String | |
| pack-priv static void | |
| pack-priv static void | writeDefinitions(TableCreator
description of the indexes to write creator, ByteBuffer Buffer to write to buffer)Writes the logical index definitions into a table definition buffer. |
| CASCADE_DELETES_FLAG | back to summary |
|---|---|
| private static final byte CASCADE_DELETES_FLAG flag for indicating that deletes should cascade in a foreign key index | |
| CASCADE_NULL_FLAG | back to summary |
|---|---|
| private static final byte CASCADE_NULL_FLAG flag for indicating that deletes should cascade a null in a foreign key index | |
| CASCADE_UPDATES_FLAG | back to summary |
|---|---|
| private static final byte CASCADE_UPDATES_FLAG flag for indicating that updates should cascade in a foreign key index | |
| data | back to summary |
|---|---|
| private final IndexData data the actual data backing this index (more than one index may be backed by the same data | |
| FK_PRIMARY_TABLE_TYPE | back to summary |
|---|---|
| pack-priv static final byte FK_PRIMARY_TABLE_TYPE index table type for the "primary" table in a foreign key index | |
| FK_SECONDARY_TABLE_TYPE | back to summary |
|---|---|
| pack-priv static final byte FK_SECONDARY_TABLE_TYPE index table type for the "secondary" table in a foreign key index | |
| FOREIGN_KEY_INDEX_TYPE | back to summary |
|---|---|
| public static final byte FOREIGN_KEY_INDEX_TYPE index type for foreign key indexes | |
| indexNumber | back to summary |
|---|---|
| private final int indexNumber 0-based index number | |
| indexType | back to summary |
|---|---|
| private final byte indexType the type of the index | |
| INVALID_INDEX_NUMBER | back to summary |
|---|---|
| private static final int INVALID_INDEX_NUMBER indicate an invalid index number for foreign key field | |
| LOGGER | back to summary |
|---|---|
| pack-priv static final Logger LOGGER | |
| name | back to summary |
|---|---|
| private String name Index name | |
| PRIMARY_KEY_INDEX_TYPE | back to summary |
|---|---|
| public static final byte PRIMARY_KEY_INDEX_TYPE index type for primary key indexes | |
| reference | back to summary |
|---|---|
| private final IndexImpl. foreign key reference info, if any | |
| IndexImpl | back to summary |
|---|---|
| pack-priv IndexImpl(ByteBuffer tableBuffer, List<IndexData> indexDatas, JetFormat format) | |
| compareTo | back to summary |
|---|---|
| public int compareTo(IndexImpl other) Implements java. Doc from java. Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. The implementor must ensure The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |
| constructIndexRow | back to summary |
|---|---|
| public Object[] constructIndexRow(String colName, Object value) Constructs an array of values appropriate for this index from the given column value.
| |
| constructIndexRow | back to summary |
|---|---|
| public Object[] constructIndexRow(Map<String, ?> row) Constructs an array of values appropriate for this index from the given column values.
| |
| constructIndexRowFromEntry | back to summary |
|---|---|
| public Object[] constructIndexRowFromEntry(Object... values) Constructs an array of values appropriate for this index from the given column values, expected to match the columns for this index.
| |
| constructPartialIndexRow | back to summary |
|---|---|
| public Object[] constructPartialIndexRow(Object filler, String colName, Object value) Constructs an array of values appropriate for this index from the given column value, which must be the first column of the index. Any missing, trailing index entry values will use the given filler value.
| |
| constructPartialIndexRow | back to summary |
|---|---|
| public Object[] constructPartialIndexRow(Object filler, Map<String, ?> row) Constructs an array of values appropriate for this index from the given column values, possibly only using a subset of the given values. A partial row can be created if one or more prefix column values are provided. If a prefix can be found, any missing, trailing index entry values will use the given filler value.
| |
| constructPartialIndexRowFromEntry | back to summary |
|---|---|
| public Object[] constructPartialIndexRowFromEntry(Object filler, Object... values) Constructs an array of values appropriate for this index from the given column values, possibly only providing a prefix subset of the index columns (at least one value must be provided). If a prefix entry is provided, any missing, trailing index entry values will use the given filler value.
| |
| cursor | back to summary |
|---|---|
| public IndexData. Gets a new cursor for this index. Forces index initialization. | |
| cursor | back to summary |
|---|---|
| public IndexData. Gets a new cursor for this index, narrowed to the range defined by the given startRow and endRow. Forces index initialization.
| |
| getColumnCount | back to summary |
|---|---|
| public int getColumnCount() Implements io. Doc from io. Returns the number of columns covered by this index.
| |
| getColumns | back to summary |
|---|---|
| public List Implements io. Doc from io. Returns the Columns for this index (unmodifiable).
| |
| getFormat | back to summary |
|---|---|
| public JetFormat getFormat() | |
| getIndexData | back to summary |
|---|---|
| public IndexData getIndexData() | |
| getIndexFlags | back to summary |
|---|---|
| public byte getIndexFlags() | |
| getIndexNumber | back to summary |
|---|---|
| public int getIndexNumber() | |
| getName | back to summary |
|---|---|
| public String getName() Implements io. Doc from io. Returns the name of this index.
| |
| getPageChannel | back to summary |
|---|---|
| public PageChannel getPageChannel() | |
| getReference | back to summary |
|---|---|
| public IndexImpl. | |
| getReferencedIndex | back to summary |
|---|---|
| public IndexImpl getReferencedIndex() throws IOException Implements io. Doc from io. Returns the Index referenced by this Index's ForeignKeyReference (if it has one), otherwise
| |
| getTable | back to summary |
|---|---|
| public TableImpl getTable() Implements io. Doc from io. Returns the table to which this index belongs.
| |
| getUniqueEntryCount | back to summary |
|---|---|
| public int getUniqueEntryCount() | |
| getUniqueEntryCountOffset | back to summary |
|---|---|
| public int getUniqueEntryCountOffset() | |
| initialize | back to summary |
|---|---|
| public void initialize() throws IOException Forces initialization of this index (actual parsing of index pages). normally, the index will not be initialized until the entries are actually needed. | |
| isForeignKey | back to summary |
|---|---|
| public boolean isForeignKey() Implements io. Doc from io. Returns
| |
| isInitialized | back to summary |
|---|---|
| public boolean isInitialized() Whether or not the complete index state has been read. | |
| isPrimaryKey | back to summary |
|---|---|
| public boolean isPrimaryKey() Implements io. Doc from io. Returns
| |
| isRequired | back to summary |
|---|---|
| public boolean isRequired() Implements io. Doc from io. Whether or not values are required for index columns.
| |
| isUnique | back to summary |
|---|---|
| public boolean isUnique() Implements io. Doc from io. Whether or not index entries must be unique. Some notes about uniqueness:
| |
| newCursor | back to summary |
|---|---|
| public CursorBuilder newCursor() Implements io. Doc from io. Convenience method for constructing a new CursorBuilder for this Index.
| |
| setName | back to summary |
|---|---|
| pack-priv void setName(String name) | |
| shouldIgnoreNulls | back to summary |
|---|---|
| public boolean shouldIgnoreNulls() Implements io. Doc from io. Whether or not
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| withErrorContext | back to summary |
|---|---|
| private String withErrorContext(String msg) | |
| withErrorContext | back to summary |
|---|---|
| private static String withErrorContext(String msg, DatabaseImpl db, String idxName) | |
| writeDefinition | back to summary |
|---|---|
| pack-priv static void writeDefinition(TableMutator mutator, IndexBuilder idx, ByteBuffer buffer) | |
| writeDefinitions | back to summary |
|---|---|
| pack-priv static void writeDefinitions(TableCreator creator, ByteBuffer buffer) Writes the logical index definitions into a table definition buffer.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final boolean | |
| private final boolean | |
| private final boolean | |
| private final int | |
| private final int | |
| private final byte |
| Access | Constructor and Description |
|---|---|
| public | ForeignKeyReference(byte tableType, int otherIndexNumber, int otherTablePageNumber, boolean cascadeUpdates, boolean cascadeDeletes, boolean cascadeNull)
|
| Modifier and Type | Method and Description |
|---|---|
| public int | |
| public int | |
| public byte | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public String |
| cascadeDeletes | back to summary |
|---|---|
| private final boolean cascadeDeletes | |
| cascadeNull | back to summary |
|---|---|
| private final boolean cascadeNull | |
| cascadeUpdates | back to summary |
|---|---|
| private final boolean cascadeUpdates | |
| otherIndexNumber | back to summary |
|---|---|
| private final int otherIndexNumber | |
| otherTablePageNumber | back to summary |
|---|---|
| private final int otherTablePageNumber | |
| tableType | back to summary |
|---|---|
| private final byte tableType | |
| ForeignKeyReference | back to summary |
|---|---|
| public ForeignKeyReference(byte tableType, int otherIndexNumber, int otherTablePageNumber, boolean cascadeUpdates, boolean cascadeDeletes, boolean cascadeNull) | |
| getOtherIndexNumber | back to summary |
|---|---|
| public int getOtherIndexNumber() | |
| getOtherTablePageNumber | back to summary |
|---|---|
| public int getOtherTablePageNumber() | |
| getTableType | back to summary |
|---|---|
| public byte getTableType() | |
| isCascadeDeletes | back to summary |
|---|---|
| public boolean isCascadeDeletes() | |
| isCascadeNullOnDelete | back to summary |
|---|---|
| public boolean isCascadeNullOnDelete() | |
| isCascadeUpdates | back to summary |
|---|---|
| public boolean isCascadeUpdates() | |
| isPrimaryTable | back to summary |
|---|---|
| public boolean isPrimaryTable() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |