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

#include <index/btree/BTree.h>

Inheritance diagram for taco::BTree::Iterator:
taco::Index::Iterator

Public Member Functions

 ~Iterator ()
 
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...
 
constexpr const IndexGetIndex () const
 Returns the underlying index. More...
 

Private Member Functions

 Iterator (BTree *btree, ScopedBufferId bufid, SlotId one_before_matching_sid, const IndexKey *key, bool upper_isstrict)
 

Private Attributes

ScopedBufferId m_bufid
 
SlotId m_sid
 
Record m_rec
 
UniqueIndexKey m_upper
 
std::vector< Datumm_upper_data_buffer
 
bool m_upper_isstrict
 

Friends

class BTree
 

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::BTree::Iterator::~Iterator ( )
inlinevirtual

Reimplemented from taco::Index::Iterator.

◆ Iterator()

taco::BTree::Iterator::Iterator ( BTree btree,
ScopedBufferId  bufid,
SlotId  one_before_matching_sid,
const IndexKey key,
bool  upper_isstrict 
)
private

Member Function Documentation

◆ EndScan()

void taco::BTree::Iterator::EndScan ( )
overridevirtual

Ends the index scan.

Implements taco::Index::Iterator.

◆ GetCurrentItem()

const Record & taco::BTree::Iterator::GetCurrentItem ( )
overridevirtual

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::BTree::Iterator::GetCurrentRecordId ( )
overridevirtual

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

Implements taco::Index::Iterator.

◆ IsAtValidItem()

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

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

Implements taco::Index::Iterator.

◆ Next()

bool taco::BTree::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

◆ BTree

friend class BTree
friend

Member Data Documentation

◆ m_bufid

ScopedBufferId taco::BTree::Iterator::m_bufid
private

◆ m_rec

Record taco::BTree::Iterator::m_rec
private

◆ m_sid

SlotId taco::BTree::Iterator::m_sid
private

◆ m_upper

UniqueIndexKey taco::BTree::Iterator::m_upper
private

◆ m_upper_data_buffer

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

◆ m_upper_isstrict

bool taco::BTree::Iterator::m_upper_isstrict
private

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