|
taco-db
0.1.0
|
A forward-iterator for the items in the index. More...
#include <index/Index.h>
Public Member Functions | |
| Iterator ()=default | |
| Iterator (const Iterator &)=delete | |
| Iterator & | operator= (const Iterator &)=delete |
| Iterator (Iterator &&it)=default | |
| Default move constructor. More... | |
| Iterator & | operator= (Iterator &&it)=default |
| Default move assignment. More... | |
| virtual | ~Iterator ()=default |
| constexpr const Index * | GetIndex () const |
| Returns the underlying index. More... | |
| virtual bool | Next ()=0 |
| Moves the iterator to the next indexed item if any. More... | |
| virtual bool | IsAtValidItem ()=0 |
| Returns whether the iterator is currently at a valid indexed item. More... | |
| virtual const Record & | GetCurrentItem ()=0 |
Returns the current indexed item the iterator is currently at, where the GetData() and GetLength() pair describes a valid buffer that contains the key, and GetRecordId() is set to the record ID of the heap record (not the index record!). More... | |
| virtual RecordId | GetCurrentRecordId ()=0 |
| Returns the record id of the indexed item the iterator is currently at. More... | |
| virtual void | EndScan ()=0 |
| Ends the index scan. More... | |
Protected Member Functions | |
| Iterator (Index *index) | |
| template<class T > | |
| constexpr T * | GetIndexAs () const |
Static casts the m_index pointer to T* type. More... | |
Private Attributes | |
| Index * | m_index |
A forward-iterator for the items in the index.
To move to the next item, one should call Next() and check if it returns true. It cannot go back to a previously returned item once another Next() is called.
|
default |
|
delete |
|
default |
Default move constructor.
|
virtualdefault |
Reimplemented in taco::BTree::Iterator.
|
inlineprotected |
|
pure virtual |
Ends the index scan.
Implemented in taco::VolatileTree::Iterator, and taco::BTree::Iterator.
|
pure virtual |
Returns the current indexed item the iterator is currently at, where the GetData() and GetLength() pair describes a valid buffer that contains the key, and GetRecordId() is set to the record ID of the heap record (not the index record!).
Implemented in taco::VolatileTree::Iterator, and taco::BTree::Iterator.
|
pure virtual |
Returns the record id of the indexed item the iterator is currently at.
Implemented in taco::VolatileTree::Iterator, and taco::BTree::Iterator.
|
inlineconstexpr |
Returns the underlying index.
|
inlineconstexprprotected |
Static casts the m_index pointer to T* type.
This should only be used when the caller is sure about the index type, e.g., a subclass of Iterator that invoked the Index(Index*) constructor.
|
pure virtual |
Returns whether the iterator is currently at a valid indexed item.
Implemented in taco::VolatileTree::Iterator, and taco::BTree::Iterator.
|
pure virtual |
Moves the iterator to the next indexed item if any.
Returns true if there's one, or false if there's not.
Implemented in taco::VolatileTree::Iterator, and taco::BTree::Iterator.
|
private |