cqosdb::Outcome Class Reference

Outcome defines interfaces for accessing returned query results. More...

#include <DB.hxx>

Inheritance diagram for cqosdb::Outcome:

cqosdb::ResultSet

List of all members.

Public Member Functions

virtual ~Outcome ()
virtual int setElements (PGresult *res)=0
 Set query results as data elements of the class.
virtual int getNumberOfRows ()=0
 Get number of rows of returned query results.
virtual int getNumberOfColumns ()=0
 Get number of columns of return query results.
virtual int getElement (int row, int column, long *res)=0
 Get an element of long type at a specified location.
virtual int getElement (int row, int column, double *res)=0
 Get an element of double type at a specified location.
virtual int getElement (int row, int column, string *res)=0
 Get an element of string type at a specified location.
virtual int getElement (int row, string name, double *res)=0
 Get an element of double type at a specified location.
virtual int getElement (int row, string name, long *res)=0
 Get an element of long type at a specified location.
virtual int getElement (int row, string name, string *res)=0
 Get an element of string type at a specified location.
virtual void clear ()=0
 Clear up elements.


Detailed Description

Outcome defines interfaces for accessing returned query results.

Constructor & Destructor Documentation

virtual cqosdb::Outcome::~Outcome (  )  [inline, virtual]


Member Function Documentation

virtual int cqosdb::Outcome::setElements ( PGresult *  res  )  [pure virtual]

Set query results as data elements of the class.

Parameters:
res is the results returned from a query. Its type is decided by the DBMS, e.g., PGresult in PostgreSQL.
Returns:
Return a success flag.

Implemented in cqosdb::ResultSet.

virtual int cqosdb::Outcome::getNumberOfRows (  )  [pure virtual]

Get number of rows of returned query results.

Implemented in cqosdb::ResultSet.

virtual int cqosdb::Outcome::getNumberOfColumns (  )  [pure virtual]

Get number of columns of return query results.

Implemented in cqosdb::ResultSet.

virtual int cqosdb::Outcome::getElement ( int  row,
int  column,
long *  res 
) [pure virtual]

Get an element of long type at a specified location.

Parameters:
row No. of row
column No. of column
res return value of the element at the location

Implemented in cqosdb::ResultSet.

virtual int cqosdb::Outcome::getElement ( int  row,
int  column,
double *  res 
) [pure virtual]

Get an element of double type at a specified location.

Parameters:
row No. of row
column No. of column
res return value of the element at the location

Implemented in cqosdb::ResultSet.

virtual int cqosdb::Outcome::getElement ( int  row,
int  column,
string *  res 
) [pure virtual]

Get an element of string type at a specified location.

Parameters:
row No. of row
column No. of column
res return value of the element at the location

Implemented in cqosdb::ResultSet.

virtual int cqosdb::Outcome::getElement ( int  row,
string  name,
double *  res 
) [pure virtual]

Get an element of double type at a specified location.

Parameters:
row No. of row
name column name
res return value of the element at the location

Implemented in cqosdb::ResultSet.

virtual int cqosdb::Outcome::getElement ( int  row,
string  name,
long *  res 
) [pure virtual]

Get an element of long type at a specified location.

Parameters:
row No. of row
name column name
res return value of the element at the location

Implemented in cqosdb::ResultSet.

virtual int cqosdb::Outcome::getElement ( int  row,
string  name,
string *  res 
) [pure virtual]

Get an element of string type at a specified location.

Parameters:
row No. of row
name column name
res return value of the element at the location

Implemented in cqosdb::ResultSet.

virtual void cqosdb::Outcome::clear (  )  [pure virtual]

Clear up elements.

Implemented in cqosdb::ResultSet.


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

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