# Index reference

The Index object can be accessed directly only in one place, in the aggregator handlers. In case if you're not sure about the difference between the Index and IndexType, it's explained in &xrsp;. The examples of the usage are shown in &xrsp;, while this section lists the available methods.

The base Index class is defined in

    table/Index.h

, and its subclasses in

    table/RootIndex.h

,

    table/FifoIndex.h

,

    table/TreeIndex.h

,

    table/TreeNestedIndex.h

.

    const IndexType *getType() const;

Get the type of this index.

    RowHandle *begin() const;

Get the handle of the first row of the group, in the default order according to its first leaf index type. Note that here it's not the whole table's first leaf index type but the first leaf in the index type subtree under this index's type. All the iteration methods return NULL if there are no more rows.

    RowHandle *next(const RowHandle *cur) const;

Get the handle of the next row (or NULL if that was the last one) in the default order. The NULL argument makes the NULL result.

    RowHandle *last() const;

Get the handle of the last row in the group in the default order.

The rest of the methods of Index aren't really to be used directly.

Index
Aggregator handler