RGMAResultSet Struct Reference

#include <rgma.h>


Data Fields

int numRows
int numCols
char ** tableNames
char ** columnNames
int * columnTypes
RGMARowrows
char * warningMessage
int endOfResults


Detailed Description

The RGMAResultSet structure holds the set of tuples (database rows) returned by a consumer query (RGMAConsumer_pop).

In an empty result set, the number of rows and columns will be zero, and the rows, tableNames, columnNames and columnTypes arrays will all be NULL. Otherwise, the arrays will all be non-NULL and contain the correct number of values (numRows for the rows array and numCols for the others).

The tableNames and columnNames arrays will never contain NULL values, but may contain empty strings. The columnTypes array will always contain valid values. Possible column types are: RGMAColumnType_INTEGER, RGMAColumnType_REAL, RGMAColumnType_DOUBLE, RGMAColumnType_TIMESTAMP, RGMAColumnType_CHAR, RGMAColumnType_VARCHAR, RGMAColumnType_DATE and RGMAColumnType_TIME.

Warnings, if any, are attached to a result set by the Registry Mediator. The warning field will never be NULL, but may be an empty string.

The endOfResults flag in the result set is set to 1 (true) when there are no more tuples to be returned for a query. Otherwise it will be 0 (false).

The result set is allocated on the heap, and you should free it by calling RGMA_freeResultSet when it is no longer required. You can also detach parts of a result set for use in your own code, by changing the corresponding pointer in the result set to NULL (RGMA_freeResultSet safely skips over NULL pointers in any part of a result set).


Field Documentation

int numRows
 

Number of rows.

int numCols
 

Number of columns.

char** tableNames
 

Array of column name prefixes.

char** columnNames
 

Array of column names.

int* columnTypes
 

Array of column types.

RGMARow* rows
 

Array of rows.

char* warningMessage
 

Mediator Warning message.

int endOfResults
 

End-of-results flag.


Generated on Wed Apr 25 19:11:54 2007 for RGMA C API by doxygen 1.3.5