cqosdb::ColumnData Class Reference

This class defines opertions related to a row of query returned data. More...

#include <MetaDB.hxx>

List of all members.

Public Member Functions

 ColumnData ()
 ~ColumnData ()
void clear ()
 Clear up internal data.
int setElement (PGresult *res, int row, int column, int type)
 Set up an element, from returned query results, at a specified location.
int getElement (int column, double *res, int parameter_type)
 Grab a double element at a specified column.
int getElement (int column, long *res, int parameter_type)
 Grab a long element at a specified column.
int getElement (int column, string *res)
 Grab a string element at a specified column.
int getElementStrongType (int column, double *res)
 Grab a strong double element at a specified column.
int getElementStrongType (int column, long *res)
 Grab a strong long element at a specified column.

Public Attributes

map< int, long > longarg
 a map of index to long type elements.
map< int, string > stringarg
 a map of index to string type elements
map< int, double > doublearg
 a map of index to double type elements


Detailed Description

This class defines opertions related to a row of query returned data.

Constructor & Destructor Documentation

cqosdb::ColumnData::ColumnData (  )  [inline]

cqosdb::ColumnData::~ColumnData (  ) 


Member Function Documentation

void cqosdb::ColumnData::clear (  ) 

Clear up internal data.

int cqosdb::ColumnData::setElement ( PGresult *  res,
int  row,
int  column,
int  type 
)

Set up an element, from returned query results, at a specified location.

Parameters:
res Returned query results
row Row where the element is located
column Column wherer the element is located
type element type

int cqosdb::ColumnData::getElement ( int  column,
double *  res,
int  parameter_type 
)

Grab a double element at a specified column.

Parameters:
column Column wherer the element is located
res Returned double element
parameter_type Strong type of the element, the element will be cast to double when return

int cqosdb::ColumnData::getElement ( int  column,
long *  res,
int  parameter_type 
)

Grab a long element at a specified column.

Parameters:
column Column wherer the element is located
res Returned long element
parameter_type Strong type of the element, the element will be cast to long when return

int cqosdb::ColumnData::getElement ( int  column,
string *  res 
)

Grab a string element at a specified column.

Parameters:
column Column wherer the element is located
res Returned string element

int cqosdb::ColumnData::getElementStrongType ( int  column,
double *  res 
)

Grab a strong double element at a specified column.

Parameters:
column Column wherer the element is located
res Returned double element

int cqosdb::ColumnData::getElementStrongType ( int  column,
long *  res 
)

Grab a strong long element at a specified column.

Parameters:
column Column wherer the element is located
res Returned double element


Member Data Documentation

a map of index to long type elements.

a map of index to string type elements

a map of index to double type elements


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

Generated on Tue Sep 23 19:59:06 2008 for CQoS Database Library by  doxygen 1.5.5