Column Store
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Postgres::PostgreSQLDataSource Class Reference

#include <PostgreSQLDataGenerator.h>

Inheritance diagram for Postgres::PostgreSQLDataSource:
Inheritance graph
Collaboration diagram for Postgres::PostgreSQLDataSource:
Collaboration graph

Public Member Functions

 PostgreSQLDataSource (PostgreSQLMetaData postgresql_meta_data, std::string r_name, vector< std::string > c={}, int b_size=5000)
 
DataRecord next ()
 
void advance (int recordCount)
 
bool hasNext ()
 
- Public Member Functions inherited from ColumnStore::DataGeneratorInterface
Metadata getMetadata () const
 Interface for relational data sources. More...
 
virtual std::vector< DataRecordnextBatch (int batchSize)
 Helper function to return batch of records. More...
 
void print (int recordCount=-1)
 Print the data. More...
 
virtual ~DataGeneratorInterface ()
 Destroy the Data Generator Interface object. More...
 

Private Member Functions

pqxx::result get_rows_of_columns (pqxx::transaction_base &txn, vector< ColumnStore::Column > columns)
 
void set_total_number_of_rows (pqxx::transaction_base &txn)
 
void load_into_queue (pqxx::transaction_base &txn, vector< ColumnStore::Column > columns)
 

Private Attributes

std::queue< DataRecorddata
 
pqxx::connection * conn
 
std::string relation_name
 
int offset
 
int batch_size
 
int total_number_of_rows
 
SchemaMetaData schema_meta_data
 
vector< std::string > columns
 

Additional Inherited Members

- Protected Attributes inherited from ColumnStore::DataGeneratorInterface
Metadata metadata
 metadata for processing queries More...
 

Constructor & Destructor Documentation

◆ PostgreSQLDataSource()

Postgres::PostgreSQLDataSource::PostgreSQLDataSource ( PostgreSQLMetaData  postgresql_meta_data,
std::string  r_name,
vector< std::string >  c = {},
int  b_size = 5000 
)
inline

Member Function Documentation

◆ advance()

void Postgres::PostgreSQLDataSource::advance ( int  recordCount)
inline
Here is the caller graph for this function:

◆ get_rows_of_columns()

pqxx::result Postgres::PostgreSQLDataSource::get_rows_of_columns ( pqxx::transaction_base &  txn,
vector< ColumnStore::Column columns 
)
inlineprivate
Here is the caller graph for this function:

◆ hasNext()

bool Postgres::PostgreSQLDataSource::hasNext ( )
inlinevirtual
Returns
returns true if record can be generated

Implements ColumnStore::DataGeneratorInterface.

Here is the caller graph for this function:

◆ load_into_queue()

void Postgres::PostgreSQLDataSource::load_into_queue ( pqxx::transaction_base &  txn,
vector< ColumnStore::Column columns 
)
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ next()

DataRecord Postgres::PostgreSQLDataSource::next ( )
inlinevirtual
Returns
next record

Implements ColumnStore::DataGeneratorInterface.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_total_number_of_rows()

void Postgres::PostgreSQLDataSource::set_total_number_of_rows ( pqxx::transaction_base &  txn)
inlineprivate

Member Data Documentation

◆ batch_size

int Postgres::PostgreSQLDataSource::batch_size
private

◆ columns

vector<std::string> Postgres::PostgreSQLDataSource::columns
private

◆ conn

pqxx::connection* Postgres::PostgreSQLDataSource::conn
private

◆ data

std::queue<DataRecord> Postgres::PostgreSQLDataSource::data
private

◆ offset

int Postgres::PostgreSQLDataSource::offset
private

◆ relation_name

std::string Postgres::PostgreSQLDataSource::relation_name
private

◆ schema_meta_data

SchemaMetaData Postgres::PostgreSQLDataSource::schema_meta_data
private

◆ total_number_of_rows

int Postgres::PostgreSQLDataSource::total_number_of_rows
private

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