taco-db  0.1.0
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
taco::VolatileTree::Iterator Class Reference

#include <index/volatiletree/VolatileTree.h>

Inheritance diagram for taco::VolatileTree::Iterator:
taco::Index::Iterator

Public Member Functions

bool Next () override
 Moves the iterator to the next indexed item if any. More...
 
bool IsAtValidItem () override
 Returns whether the iterator is currently at a valid indexed item. More...
 
const RecordGetCurrentItem () override
 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...
 
RecordId GetCurrentRecordId () override
 Returns the record id of the indexed item the iterator is currently at. More...
 
void EndScan () override
 Ends the index scan. More...
 
- Public Member Functions inherited from taco::Index::Iterator
 Iterator ()=default
 
 Iterator (const Iterator &)=delete
 
Iteratoroperator= (const Iterator &)=delete
 
 Iterator (Iterator &&it)=default
 Default move constructor. More...
 
Iteratoroperator= (Iterator &&it)=default
 Default move assignment. More...
 
virtual ~Iterator ()=default
 
constexpr const IndexGetIndex () const
 Returns the underlying index. More...
 

Private Member Functions

 Iterator (VolatileTree *index, VolatileTree::map_iterator iter, const IndexKey *upper, bool upper_isstrict)
 

Private Attributes

VolatileTree::map_iterator m_iter
 
Record m_rec
 
UniqueIndexKey m_upper
 
std::vector< Datumm_upper_data_buffer
 
bool m_is_first
 
bool m_upper_isstrict
 

Friends

class VolatileTree
 

Additional Inherited Members

- Protected Member Functions inherited from taco::Index::Iterator
 Iterator (Index *index)
 
template<class T >
constexpr T * GetIndexAs () const
 Static casts the m_index pointer to T* type. More...
 

Constructor & Destructor Documentation

◆ Iterator()

taco::VolatileTree::Iterator::Iterator ( VolatileTree index,
VolatileTree::map_iterator  iter,
const IndexKey upper,
bool  upper_isstrict 
)
private

Member Function Documentation

◆ EndScan()

void taco::VolatileTree::Iterator::EndScan ( )
inlineoverridevirtual

Ends the index scan.

Implements taco::Index::Iterator.

◆ GetCurrentItem()

const Record& taco::VolatileTree::Iterator::GetCurrentItem ( )
inlineoverridevirtual

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!).

Implements taco::Index::Iterator.

◆ GetCurrentRecordId()

RecordId taco::VolatileTree::Iterator::GetCurrentRecordId ( )
inlineoverridevirtual

Returns the record id of the indexed item the iterator is currently at.

Implements taco::Index::Iterator.

◆ IsAtValidItem()

bool taco::VolatileTree::Iterator::IsAtValidItem ( )
overridevirtual

Returns whether the iterator is currently at a valid indexed item.

Implements taco::Index::Iterator.

◆ Next()

bool taco::VolatileTree::Iterator::Next ( )
overridevirtual

Moves the iterator to the next indexed item if any.

Returns true if there's one, or false if there's not.

Implements taco::Index::Iterator.

Friends And Related Function Documentation

◆ VolatileTree

friend class VolatileTree
friend

Member Data Documentation

◆ m_is_first

bool taco::VolatileTree::Iterator::m_is_first
private

◆ m_iter

VolatileTree::map_iterator taco::VolatileTree::Iterator::m_iter
private

◆ m_rec

Record taco::VolatileTree::Iterator::m_rec
private

◆ m_upper

UniqueIndexKey taco::VolatileTree::Iterator::m_upper
private

◆ m_upper_data_buffer

std::vector<Datum> taco::VolatileTree::Iterator::m_upper_data_buffer
private

◆ m_upper_isstrict

bool taco::VolatileTree::Iterator::m_upper_isstrict
private

The documentation for this class was generated from the following files: