Main Page   Class Hierarchy   Compound List   File List   Compound Members  

TDBResult Class Reference

Holds the result of a database query or some other database related operation. More...

#include <TDBResult.hh>

List of all members.

Public Methods

 ~TDBResult ()
 Destructor.

bool IsValid ()
 Query if an error has occurred.

TStringErrorMessage ()
 Get error message string.

int Tuples ()
 Query number of tuples in result.

int Fields ()
 Query number of fields in result.

bool IsNull (int tuple, int field)
 Query if specified field is null.

TStringValue (int tuple, int field)
 Get value of the specified field.

TStringValue2 (int tuple, int field)
 Get value of the specified field.


Friends

class TDBConnection


Detailed Description

Holds the result of a database query or some other database related operation.

Currently only PostgreSQL is supported.

Author:
Johan Bolmsjo <johan@nocrew.org>


Member Function Documentation

TString& TDBResult::ErrorMessage  
 

Get error message string.

Returns:
Error message.

int TDBResult::Fields   [inline]
 

Query number of fields in result.

Returns:
Number of fields.

bool TDBResult::IsNull int    tuple,
int    field
[inline]
 

Query if specified field is null.

Returns:
true, false

bool TDBResult::IsValid   [inline]
 

Query if an error has occurred.

Returns:
true, false

int TDBResult::Tuples   [inline]
 

Query number of tuples in result.

Returns:
Number of tuples.

TString& TDBResult::Value int    tuple,
int    field
 

Get value of the specified field.

Parameters:
tuple Tuple (row) number
field Field (attribute) number
Returns:
Result string

TString* TDBResult::Value2 int    tuple,
int    field
 

Get value of the specified field.

Unlike Value() the caller owns the returned string and is responsible for destroying it when no longer needed.

Parameters:
tuple Tuple (row) number
field Field (attribute) number
Returns:
Result string


The documentation for this class was generated from the following file:
Generated on Sat Feb 15 18:37:16 2003 for Tools by doxygen1.3-rc2