|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Index
A database index. (Right now, this class assumes an Index over a single column. Multipart indices will come later.)
TODO: Support expression and/or function e.g UPPER(name)
TODO: Support for Multi column index, very useful for composite keys
| Field Summary | |
|---|---|
static java.lang.String |
ARRAY
|
static java.lang.String |
BTREE
|
static java.lang.String |
DEFAULT
|
static java.lang.String |
TTREE
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from interface org.axiondb.event.TableModificationListener |
|---|
columnAdded, constraintAdded, constraintRemoved, rowDeleted, rowInserted, rowUpdated |
| Field Detail |
|---|
static final java.lang.String ARRAY
static final java.lang.String BTREE
static final java.lang.String DEFAULT
static final java.lang.String TTREE
| Method Detail |
|---|
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 traversal
AxionExceptionjava.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 to
AxionExceptionjava.lang.String getType()
boolean isUnique()
void save(java.io.File dataDirectory)
throws AxionException
AxionException
void 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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||