TIBCO ActiveSpaces®
Functions
resultset.h File Reference

A resultset object is used to iterate over some or all of the rows that are returned after executing a query. More...

Functions

TIBDG_API void tibdgResultSet_Close (tibEx e, tibdgResultSet resultSet)
 Close the resultset object. More...
 
TIBDG_API tibdgStatement tibdgResultSet_GetStatement (tibEx e, tibdgResultSet resultSet)
 Get the statement associated with this resultset. More...
 
TIBDG_API tibbool_t tibdgResultSet_HasNext (tibEx e, tibdgResultSet resultSet)
 Inform the caller if the resultset has more rows or not. More...
 
TIBDG_API tibdgRow tibdgResultSet_Next (tibEx e, tibdgResultSet resultSet)
 Advance the resultset to the next row and returns it. More...
 

Detailed Description

A resultset object is used to iterate over some or all of the rows that are returned after executing a query.

A program that creates a resultset object must explicitly call tibdgResultSet_Close to reclaim its resources.

Function Documentation

TIBDG_API void tibdgResultSet_Close ( tibEx  e,
tibdgResultSet  resultSet 
)

Close the resultset object.

Note that this must be called in order to execute another query on the original statement object that was used to create this resultset.

Parameters
eThe exception object captures information about failures.
resultSetThe resultset to be closed.
Returns
void
TIBDG_API tibdgStatement tibdgResultSet_GetStatement ( tibEx  e,
tibdgResultSet  resultSet 
)

Get the statement associated with this resultset.

Parameters
eThe exception object captures information about failures.
resultSetThe resultset.
Returns
the statement
TIBDG_API tibbool_t tibdgResultSet_HasNext ( tibEx  e,
tibdgResultSet  resultSet 
)

Inform the caller if the resultset has more rows or not.

May block the first time it is called to populate results

Parameters
eThe exception object captures information about failures.
resultSetThe resulSet from which to check if there are more rows.
Returns
tibbool_t
TIBDG_API tibdgRow tibdgResultSet_Next ( tibEx  e,
tibdgResultSet  resultSet 
)

Advance the resultset to the next row and returns it.

This call advances the resultset beyond the current row. If the next row exists, this call returns it. If the current row is the last or if an exception has been thrown, this call returns NULL. Note that the row returned can be used in tibdgRow methods but may not be used in table operations.

Parameters
eThe exception object captures information about failures.
resultSetThe resultset to be advanced.
Returns
On success, this call returns the row.
On failure, this call returns NULL.