2. Queries
Prev | Chapter 3. ZOOM | Next

## 2. Queries

Query objects represents queries.

         ZOOM_query ZOOM_query_create(void);

         void ZOOM_query_destroy(ZOOM_query q);

         int ZOOM_query_prefix(ZOOM_query q, const char *str);

         int ZOOM_query_cql(ZOOM_query s, const char *str);

         int ZOOM_query_sortby(ZOOM_query q, const char *criteria);

Create query objects using `ZOOM_query_create` and destroy them by calling `ZOOM_query_destroy`. RPN-queries can be specified in PQF notation by using the function `ZOOM_query_prefix`. The `ZOOM_query_cql` specifies a CQL query to be sent to the server/target. More query types will be added in future versions of YAZ, such as CCL to RPN-mapping, native CCL query, etc. In addition to a search, a sort criteria may be set. Function `ZOOM_query_sortby` specifies a sort criteria using the same string notation for sort as offered by the YAZ client.

### 2.1. Protocol behavior

The query object is just an interface for the member Query in the SearchRequest. The sortby-function is an interface to the sortSequence member of the SortRequest.

Prev | Up | Next
Chapter 3. ZOOM | Home | 3. Result sets