Main Page   Namespace List   Compound List   File List   Namespace Members   Compound Members   File Members  

oralib::resultset Class Reference

Encapsulates a resultset - SQL select statement result or ref cursor bound variable. More...

#include <resultset.h>

List of all members.

Public Methods

bool eod (void) const
 Returns whether end-of-data has been reached (or whether current row is the last one).

bool operator++ ()
 Advances to the next row; returns whether current one is the last one.

bool next (void)
 Advances to the next row; returns whether current one is the last one.

const columnoperator[] (IN const char *column_name) const
 Access to resultset's columns by exact column name (case-sensitive).

const columnoperator[] (IN ub2 column_index) const
 Access to resultset's columns by 0- or 1-based column index (oralib::FIRST_COLUMN_NO).

void release (void)
 Releases resources allocated for the resultset.


Friends

class connection
class statement
class parameter
class column


Detailed Description

Encapsulates a resultset - SQL select statement result or ref cursor bound variable.

resultset is read-only result from a SQL select statement. Because it is read-only, that means it is also output-only. resultset contains one or more column's defined with the select statement.

Supported data types are described in oralib::DataTypesEnum and currently are: text, numeric, date/time.

OraLib resultsets are forward-only - could be iterated from the first to the last row in forward direction. Random access and total number of rows are not available. Previously fetched rows are not cached, so there is no "previous row" method.

eod() could be used to test for end-of-data (that is whether current row is last row). next() and operator++() will also return end-of-data flag.

resultset column's could be accessed with array element operator[] where index could be a numeric (0- or 1-based sequential number for the column) or string (exact column name).


The documentation for this class was generated from the following files:
Generated on Sun Aug 18 13:56:27 2002 for OraLib by doxygen1.2.17