Column Store
Public Member Functions | Private Attributes | List of all members
ColumnStore::DataRecordMetadata Class Reference

Stores metadata information of the data record. More...

#include <DataRecord.h>

Collaboration diagram for ColumnStore::DataRecordMetadata:
Collaboration graph

Public Member Functions

 DataRecordMetadata (std::vector< Column > columns)
 
std::vector< Column > & getColumns ()
 Get the Columns object. More...
 
Columnoperator[] (int i)
 Access Column by index. More...
 
ColumngetColumn (std::string name)
 Get the Column object by name. More...
 
ColumngetColumn (int i)
 Get the Column object by index. More...
 
Columnoperator[] (std::string name)
 Access column object by index. More...
 
void print (DataRecord &record)
 Pretty print a single data record. More...
 
void print ()
 Print metadata. More...
 

Private Attributes

std::vector< Columncolumns
 
std::unordered_map< std::string, int > columnMap
 Map from column name to column index. More...
 

Detailed Description

Stores metadata information of the data record.

Metadata information include names of columns, the types of the columns and also the column index of each column. Each DataGenerator source will provide this metadata. Actual values from individual data records can be extracted using this metadata

See also
DataRecord
DataGeneratorInterface

Constructor & Destructor Documentation

◆ DataRecordMetadata()

ColumnStore::DataRecordMetadata::DataRecordMetadata ( std::vector< Column columns)
inline

Member Function Documentation

◆ getColumn() [1/2]

Column& ColumnStore::DataRecordMetadata::getColumn ( int  i)
inline

Get the Column object by index.

Parameters
i
Returns
Column

◆ getColumn() [2/2]

Column& ColumnStore::DataRecordMetadata::getColumn ( std::string  name)
inline

Get the Column object by name.

Parameters
name
Returns
Column

◆ getColumns()

std::vector<Column>& ColumnStore::DataRecordMetadata::getColumns ( )
inline

Get the Columns object.

Returns
column list

◆ operator[]() [1/2]

Column& ColumnStore::DataRecordMetadata::operator[] ( int  i)
inline

Access Column by index.

Parameters
iindex
Returns
Column

◆ operator[]() [2/2]

Column& ColumnStore::DataRecordMetadata::operator[] ( std::string  name)
inline

Access column object by index.

Parameters
name
Returns
Column

◆ print() [1/2]

void ColumnStore::DataRecordMetadata::print ( )
inline

Print metadata.

Prints column names and type

◆ print() [2/2]

void ColumnStore::DataRecordMetadata::print ( DataRecord record)
inline

Pretty print a single data record.

Prints the column names and the record data in tabular form

Parameters
recordto be printed

Member Data Documentation

◆ columnMap

std::unordered_map<std::string, int> ColumnStore::DataRecordMetadata::columnMap
private

Map from column name to column index.

◆ columns

std::vector<Column> ColumnStore::DataRecordMetadata::columns
private

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