Retrieves OIDs and optionally name-value records matching a query.
hcerr_t hc_query_ez(hc_session_t *session, hc_string_t query, hc_string_t selects, int n_selects, int results_per_fetch, hc_query_result_set_t **rsetp);
This function retrieves OIDs and optionally name-value records matching a query. If the selects list is NULL, only OIDs are retrieved. If selects is not NULL, name-value records are also retrieved and should each be freed using hc_nvr_free. In both cases the result set should be freed using hc_qrs_free.
When a query is incorrect and elicits an error from the server, the error is often reported after hc_qrs_freeand not from hc_query_ez. Your application should be prepared to receive and report an error from either place.
IN: The session for the host and port to talk to.
IN: Query (where clause with names in single quotes).
IN: Points to an array of hc_string_t, each member of which is the name of a field to retrieve from the metadata (select clause). Set to NULL to only retrieve OIDs matching the query.
IN: The number of items in the select clause.
IN: The number of results to return on each fetch from the server. results_per_fetch must be greater than 0.
OUT: Updated to point to the new result set. See hc_query_result_set_t.
HCERR_OK HCERR_OOM HCERR_BAD_REQUEST HCERR_NULL_SESSION HCERR_INVALID_SESSION HCERR_ILLEGAL_ARGUMENT