Sun StorageTek 5800 System Client API Reference Guide

hc_qrs_next_ez

Fetches the next OID and optionally name-value record from the QueryResultSet.

Synopsis

     hcerr_t hc_qrs_next_ez(**rset, 
          hc_oid *oid, 
          hc_nvr_t **nvrp,
          int *finishedp);

Description

This function fetches an OID and optionally name-value record from the query result set. Once the last result is fetched, in subsequent calls the int pointed to by finishedp is set to 1.

Parameters

rset

IN: Current query result set. See hc_query_result_set_t.

oid

OUT: Points to an OID that is updated to the OID of a record matching the query, assuming finishedp is 0.

nvrp

OUT: Updated to point to a name-value record with the metadata from the OID matching the query, assuming the query specified selects and assuming finishedp is 0. Note that you must free the name-value record using hc_nvr_free.

finishedp

OUT: Points to an int that is updated to 0 if query data has been returned and to 1 if the result set is empty.

Return Codes

     HCERR_OK
     HCERR_OOM
     HCERR_BAD_REQUEST
     HCERR_INVALID_RESULT_SET
     HCERR_ILLEGAL_ARGUMENT