public interface Index extends TableModificationListener
TODO: Support expression and/or function e.g UPPER(name)
TODO: Support for Multi column index, very useful for composite keys
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ARRAY |
static java.lang.String |
BTREE |
static java.lang.String |
DEFAULT |
static java.lang.String |
TTREE |
| Modifier and Type | Method and Description |
|---|---|
void |
changeRowId(Table table,
Row row,
int oldId,
int newId) |
Column |
getIndexedColumn()
Returns the column I index.
|
IndexLoader |
getIndexLoader() |
RowIterator |
getInorderRowIterator(RowSource source)
Returns a
RowIteratorwhich is inorder traversal of keys, |
java.lang.String |
getName()
Returns my name.
|
RowIterator |
getRowIterator(RowSource source,
Function fn,
java.lang.Object value)
Returns a
RowIteratorover the indexed rows, limited by the given
ComparisonOperator/value pair, using the default sort order. |
java.lang.String |
getType()
Returns my type.
|
boolean |
isUnique()
Whether or not I allow duplicate values.
|
void |
save(java.io.File dataDirectory) |
void |
saveAfterTruncate(java.io.File dataDirectory) |
boolean |
supportsFunction(Function fn)
Returns true iff
#getRowIterator(org.axiondb.RowSource,org.axiondb.ComparisonOperator,java.lang.Object)
can support the given operator, false otherwise. |
void |
truncate() |
columnAdded, constraintAdded, constraintRemoved, rowDeleted, rowInserted, rowUpdatedstatic final java.lang.String ARRAY
static final java.lang.String BTREE
static final java.lang.String DEFAULT
static final java.lang.String TTREE
void changeRowId(Table table, Row row, int oldId, int newId) throws AxionException
AxionExceptionColumn getIndexedColumn()
IndexLoader getIndexLoader()
RowIterator getInorderRowIterator(RowSource source) throws AxionException
RowIteratorwhich is inorder traversal of keys,source - table/view for which we need to get inorder traversalAxionExceptionjava.lang.String getName()
RowIterator getRowIterator(RowSource source, Function fn, java.lang.Object value) throws AxionException
RowIteratorover the indexed rows, limited by the given
ComparisonOperator/value pair, using the default sort order.operator - the ComparisonOperatorto applyvalue - the value to compare the indexed column toAxionExceptionjava.lang.String getType()
boolean isUnique()
void save(java.io.File dataDirectory) throws AxionException
AxionExceptionvoid saveAfterTruncate(java.io.File dataDirectory)
throws AxionException
AxionExceptionboolean supportsFunction(Function fn)
#getRowIterator(org.axiondb.RowSource,org.axiondb.ComparisonOperator,java.lang.Object)
can support the given operator, false otherwise.void truncate()
throws AxionException
AxionException