IODA Bundle
odc::SelectIterator Class Reference

#include <SelectIterator.h>

Inheritance diagram for odc::SelectIterator:
[legend]
Collaboration diagram for odc::SelectIterator:
[legend]

Public Member Functions

 SelectIterator (const std::string &select, eckit::sql::SQLSession &session, sql::SQLSelectOutput &output)
 
 ~SelectIterator ()
 
bool isNewDataset ()
 
const double * data () const
 
double & data (size_t i)
 
const core::MetaDatacolumns () const
 
const core::MetaDatacolumns (const core::MetaData &)
 
void setNumberOfColumns (size_t)
 
const std::map< std::string, std::string > & properties () const
 
int close ()
 
int setColumn (size_t index, std::string name, api::ColumnType type)
 
void writeHeader ()
 
int setBitfieldColumn (size_t index, std::string name, api::ColumnType type, eckit::sql::BitfieldDef b)
 
void missingValue (size_t, double)
 
void setOutputRowBuffer (double *data, size_t count=0)
 Set an output buffer for retrieving the next row(s) More...
 
size_t dataOffset (size_t i) const
 The offset of a given column in the doubles[] data array. More...
 
size_t rowDataSizeDoubles () const
 
bool next ()
 

Protected Attributes

int refCount_
 

Private Member Functions

void parse ()
 

Private Attributes

std::string select_
 
sql::SQLSelectOutputoutput_
 
eckit::sql::SQLSelect * selectStmt_
 
eckit::sql::SQLSession & session_
 
bool noMore_
 

Friends

class odc::IteratorProxy< odc::SelectIterator, odc::Select, const double >
 

Detailed Description

Definition at line 45 of file SelectIterator.h.

Constructor & Destructor Documentation

◆ SelectIterator()

odc::SelectIterator::SelectIterator ( const std::string &  select,
eckit::sql::SQLSession &  session,
sql::SQLSelectOutput output 
)

Definition at line 27 of file SelectIterator.cc.

Here is the call graph for this function:

◆ ~SelectIterator()

odc::SelectIterator::~SelectIterator ( )

Definition at line 37 of file SelectIterator.cc.

Member Function Documentation

◆ close()

int odc::SelectIterator::close ( )
inline

Definition at line 63 of file SelectIterator.h.

Here is the caller graph for this function:

◆ columns() [1/2]

const core::MetaData& odc::SelectIterator::columns ( ) const
inline

Definition at line 57 of file SelectIterator.h.

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

◆ columns() [2/2]

const core::MetaData& odc::SelectIterator::columns ( const core::MetaData )
inline

Definition at line 58 of file SelectIterator.h.

◆ data() [1/2]

const double* odc::SelectIterator::data ( ) const
inline

Definition at line 53 of file SelectIterator.h.

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

◆ data() [2/2]

double& odc::SelectIterator::data ( size_t  i)
inline

Definition at line 55 of file SelectIterator.h.

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

◆ dataOffset()

size_t odc::SelectIterator::dataOffset ( size_t  i) const
inline

The offset of a given column in the doubles[] data array.

Definition at line 73 of file SelectIterator.h.

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

◆ isNewDataset()

bool odc::SelectIterator::isNewDataset ( )
inline

Definition at line 52 of file SelectIterator.h.

Here is the caller graph for this function:

◆ missingValue()

void odc::SelectIterator::missingValue ( size_t  ,
double   
)
inline

Definition at line 67 of file SelectIterator.h.

◆ next()

bool odc::SelectIterator::next ( )

Definition at line 55 of file SelectIterator.cc.

Here is the caller graph for this function:

◆ parse()

void odc::SelectIterator::parse ( )
private

Definition at line 40 of file SelectIterator.cc.

Here is the caller graph for this function:

◆ properties()

const std::map<std::string, std::string>& odc::SelectIterator::properties ( ) const
inline

Definition at line 61 of file SelectIterator.h.

◆ rowDataSizeDoubles()

size_t odc::SelectIterator::rowDataSizeDoubles ( ) const
inline

Definition at line 76 of file SelectIterator.h.

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

◆ setBitfieldColumn()

int odc::SelectIterator::setBitfieldColumn ( size_t  index,
std::string  name,
api::ColumnType  type,
eckit::sql::BitfieldDef  b 
)
inline

Definition at line 66 of file SelectIterator.h.

◆ setColumn()

int odc::SelectIterator::setColumn ( size_t  index,
std::string  name,
api::ColumnType  type 
)
inline

Definition at line 64 of file SelectIterator.h.

◆ setNumberOfColumns()

void odc::SelectIterator::setNumberOfColumns ( size_t  )
inline

Definition at line 59 of file SelectIterator.h.

◆ setOutputRowBuffer()

void odc::SelectIterator::setOutputRowBuffer ( double *  data,
size_t  count = 0 
)

Set an output buffer for retrieving the next row(s)

Definition at line 66 of file SelectIterator.cc.

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

◆ writeHeader()

void odc::SelectIterator::writeHeader ( )
inline

Definition at line 65 of file SelectIterator.h.

Friends And Related Function Documentation

◆ odc::IteratorProxy< odc::SelectIterator, odc::Select, const double >

friend class odc::IteratorProxy< odc::SelectIterator, odc::Select, const double >
friend

Definition at line 97 of file SelectIterator.h.

Member Data Documentation

◆ noMore_

bool odc::SelectIterator::noMore_
private

Definition at line 94 of file SelectIterator.h.

◆ output_

sql::SQLSelectOutput& odc::SelectIterator::output_
private

Definition at line 86 of file SelectIterator.h.

◆ refCount_

int odc::SelectIterator::refCount_
protected

Definition at line 97 of file SelectIterator.h.

◆ select_

std::string odc::SelectIterator::select_
private

Definition at line 84 of file SelectIterator.h.

◆ selectStmt_

eckit::sql::SQLSelect* odc::SelectIterator::selectStmt_
private

Definition at line 88 of file SelectIterator.h.

◆ session_

eckit::sql::SQLSession& odc::SelectIterator::session_
private

Definition at line 90 of file SelectIterator.h.


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