hc_pstmt_query_ez
RetrievesOIDs and optionally name-value records matching a prepared statement.
Synopsis
hcerr_t hc_pstmt_query_ez(*pstmt,hc_string_t selects[],
int n_selects,
int results_per_fetch,
hc_query_result_set_t **rsetp);
Description
Thisfunction retrieves OIDs and optionally name-value records matching a prepared
statement.hc_qrs_next_ez” on page 96 is used to access the results in the result set. If the
selectslist is NULL, only OIDs are retrieved. If selects isnot NULL, name-value records are
alsoretrieved and should each be freed using hc_nvr_free” on page 66. In both cases the result
setshould be freed using hc_qrs_free” on page 99.
Note– When a query is incorrect and elicits an error from the server, the error is often reported
afterhc_qrs_free” on page 99 and not from hc_pstmt_query_ez” on page 109. Your
applicationshould be prepared to receive and report an error from either place.
Parameters
pstmt
IN:Prepared statement generated by hc_pstmt_create” on page 100.
selects
IN:Points to an array of hc_string_t” on page 46, each of which is the name of a eld to
retrievefrom the metadata (select clause).Set to NULL toonly retrieve OIDs matching the
query.
n_selects
IN:The number of items in the select clause.
results_per_fetch
IN:The number of results per internal fetch.
rsetp
OUT:Updated to point to the new result set. See hc_query_result_set_t” on page 49.
SynchronousCAPI Functions
Chapter3 Sun StorageTek5800 System C Client API 109