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

#include <index/TableBulkLoadIterator.h>

Inheritance diagram for taco::TableBulkLoadIterator:
taco::BulkLoadIterator

Public Member Functions

 TableBulkLoadIterator (std::shared_ptr< const IndexDesc > idxdesc, Table::Iterator &&iter)
 
bool Next () override
 Subclass should override the Next() function for moving to the next (key, record id) pair. More...
 
void EndScan () override
 Ends the scan. More...
 
- Public Member Functions inherited from taco::BulkLoadIterator
 BulkLoadIterator (const Schema *key_schema)
 Constructs a bulk load iterator with the key_schema. More...
 
virtual ~BulkLoadIterator ()
 Destructor. More...
 
const IndexKeyGetCurrentKey ()
 Returns the current key. More...
 
const RecordIdGetCurrentRecordId ()
 Returns the current record id. More...
 

Private Attributes

std::shared_ptr< const IndexDescm_idxdesc
 
Table::Iterator m_iter
 
std::vector< Datumm_data
 

Additional Inherited Members

- Protected Attributes inherited from taco::BulkLoadIterator
const Schemam_key_schema
 
unique_malloced_ptr m_key
 
RecordId m_recid
 

Constructor & Destructor Documentation

◆ TableBulkLoadIterator()

taco::TableBulkLoadIterator::TableBulkLoadIterator ( std::shared_ptr< const IndexDesc idxdesc,
Table::Iterator &&  iter 
)

Member Function Documentation

◆ EndScan()

void taco::TableBulkLoadIterator::EndScan ( )
overridevirtual

Ends the scan.

If the subclass does want it to be called again in the destructor if it has been called, it should set m_key_schema to nullptr.

Implements taco::BulkLoadIterator.

◆ Next()

bool taco::TableBulkLoadIterator::Next ( )
overridevirtual

Subclass should override the Next() function for moving to the next (key, record id) pair.

Upon a successful return, Next() should call IndexKey::Construct on the preallocated IndexKey m_key, which is sufficient to hold key_schema->GetNumFields() references to the keys, and m_recid is set record id this key maps to.

Implements taco::BulkLoadIterator.

Member Data Documentation

◆ m_data

std::vector<Datum> taco::TableBulkLoadIterator::m_data
private

◆ m_idxdesc

std::shared_ptr<const IndexDesc> taco::TableBulkLoadIterator::m_idxdesc
private

◆ m_iter

Table::Iterator taco::TableBulkLoadIterator::m_iter
private

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