DB::ResultSet Class Reference

#include <db.h>

Inheritance diagram for DB::ResultSet:

DB::MySQL_ResultSet DB::Sqlite3_ResultSet List of all members.

Public Member Functions

virtual ~ResultSet (void)
virtual bool close (void)=0
virtual bool next (void)=0
virtual unsigned int findColumn (const char *field) const =0
virtual unsigned long recordCount (void) const =0
virtual const char * getString (const int idx) const =0
virtual const int getInteger (const int idx) const =0
virtual const bool getBool (const int idx) const =0
virtual const time_t getUnixTime (const int idx) const =0
virtual const double getDouble (const int idx) const =0
virtual const float getFloat (const int idx) const =0
virtual const long getLong (const int idx) const =0
virtual const short getShort (const int idx) const =0

Detailed Description

A ResultSet object is not updatable and has a cursor that moves forward only. Thus, you can iterate through it only once and only from the first row to the last row.

The ResultSet interface provides getter methods for retrieving column values from the current row. Values can be retrieved using the index number of the column. Columns are numbered from zero (0).

For the getter methods, a given driver attempts to convert the underlying data to the C++ type specified in the getter method and returns a suitable value.

A ResultSet object MUST be closed when done, which will automatically handle freeing the memory associated with the object.

NOTE: Only getString will return NULL if the database had a NULL value stored, the rest will return ZERO!

Definition at line 52 of file db.h.


Constructor & Destructor Documentation

virtual DB::ResultSet::~ResultSet ( void   )  [inline, virtual]

Definition at line 55 of file db.h.

00055 {};


Member Function Documentation

virtual bool DB::ResultSet::close ( void   )  [pure virtual]

Implemented in DB::MySQL_ResultSet, and DB::Sqlite3_ResultSet.

virtual unsigned int DB::ResultSet::findColumn ( const char *  field  )  const [pure virtual]

Implemented in DB::MySQL_ResultSet, and DB::Sqlite3_ResultSet.

virtual const bool DB::ResultSet::getBool ( const int  idx  )  const [pure virtual]

Implemented in DB::MySQL_ResultSet, and DB::Sqlite3_ResultSet.

virtual const double DB::ResultSet::getDouble ( const int  idx  )  const [pure virtual]

Implemented in DB::MySQL_ResultSet, and DB::Sqlite3_ResultSet.

virtual const float DB::ResultSet::getFloat ( const int  idx  )  const [pure virtual]

Implemented in DB::MySQL_ResultSet, and DB::Sqlite3_ResultSet.

virtual const int DB::ResultSet::getInteger ( const int  idx  )  const [pure virtual]

Implemented in DB::MySQL_ResultSet, and DB::Sqlite3_ResultSet.

virtual const long DB::ResultSet::getLong ( const int  idx  )  const [pure virtual]

Implemented in DB::MySQL_ResultSet, and DB::Sqlite3_ResultSet.

virtual const short DB::ResultSet::getShort ( const int  idx  )  const [pure virtual]

Implemented in DB::MySQL_ResultSet, and DB::Sqlite3_ResultSet.

virtual const char* DB::ResultSet::getString ( const int  idx  )  const [pure virtual]

Implemented in DB::MySQL_ResultSet, and DB::Sqlite3_ResultSet.

virtual const time_t DB::ResultSet::getUnixTime ( const int  idx  )  const [pure virtual]

Implemented in DB::MySQL_ResultSet, and DB::Sqlite3_ResultSet.

virtual bool DB::ResultSet::next ( void   )  [pure virtual]

Implemented in DB::MySQL_ResultSet, and DB::Sqlite3_ResultSet.

virtual unsigned long DB::ResultSet::recordCount ( void   )  const [pure virtual]

Implemented in DB::MySQL_ResultSet, and DB::Sqlite3_ResultSet.


The documentation for this class was generated from the following file:
Generated on Tue Apr 24 18:59:42 2007 for DbAbstract by  doxygen 1.4.7