YAZ  5.23.1
Data Structures | Macros | Functions
zoom-query.c File Reference

Implements ZOOM C query interface. More...

#include <assert.h>
#include <string.h>
#include <errno.h>
#include "zoom-p.h"
#include <yaz/yaz-util.h>
#include <yaz/xmalloc.h>
#include <yaz/log.h>
#include <yaz/pquery.h>
#include <yaz/cql.h>
#include <yaz/ccl.h>
#include <yaz/sortspec.h>

Go to the source code of this file.

Data Structures

struct  ZOOM_query_p
 

Macros

#define SORT_STRATEGY_Z3950   0
 
#define SORT_STRATEGY_TYPE7   1
 
#define SORT_STRATEGY_CQL   2
 
#define SORT_STRATEGY_SRU11   3
 
#define SORT_STRATEGY_EMBED   4
 
#define SORT_STRATEGY_SOLR   5
 

Functions

static int generate (ZOOM_query s)
 
const char * ZOOM_query_get_sru11 (ZOOM_query s)
 
Z_QueryZOOM_query_get_Z_Query (ZOOM_query s)
 
Z_SortKeySpecListZOOM_query_get_sortspec (ZOOM_query s)
 
const char * ZOOM_query_get_query_string (ZOOM_query s)
 
void ZOOM_query_get_hash (ZOOM_query s, WRBUF w)
 
static char * cql2pqf (ZOOM_connection c, const char *cql)
 
 ZOOM_query_create (void)
 
 ZOOM_query_destroy (ZOOM_query s)
 
 ZOOM_query_addref (ZOOM_query s)
 
 ZOOM_query_prefix (ZOOM_query s, const char *str)
 
 ZOOM_query_cql (ZOOM_query s, const char *str)
 
 ZOOM_query_cql2rpn (ZOOM_query s, const char *str, ZOOM_connection conn)
 
 ZOOM_query_ccl2rpn (ZOOM_query s, const char *str, const char *config, int *ccl_error, const char **error_string, int *error_pos)
 
 ZOOM_query_sortby (ZOOM_query s, const char *criteria)
 
 ZOOM_query_sortby2 (ZOOM_query s, const char *strategy, const char *criteria)
 

Detailed Description

Implements ZOOM C query interface.

Definition in file zoom-query.c.

Macro Definition Documentation

#define SORT_STRATEGY_CQL   2

Definition at line 28 of file zoom-query.c.

Referenced by generate(), and ZOOM_query_sortby2().

#define SORT_STRATEGY_EMBED   4

Definition at line 30 of file zoom-query.c.

Referenced by generate(), and ZOOM_query_sortby2().

#define SORT_STRATEGY_SOLR   5

Definition at line 31 of file zoom-query.c.

Referenced by generate(), and ZOOM_query_sortby2().

#define SORT_STRATEGY_SRU11   3

Definition at line 29 of file zoom-query.c.

Referenced by generate(), and ZOOM_query_sortby2().

#define SORT_STRATEGY_TYPE7   1

Definition at line 27 of file zoom-query.c.

Referenced by generate(), and ZOOM_query_sortby2().

#define SORT_STRATEGY_Z3950   0

Definition at line 26 of file zoom-query.c.

Referenced by ZOOM_query_create(), ZOOM_query_get_sortspec(), and ZOOM_query_sortby2().

Function Documentation

static char* cql2pqf ( ZOOM_connection  c,
const char *  cql 
)
static
static int generate ( ZOOM_query  s)
static
ZOOM_query_addref ( ZOOM_query  s)

Definition at line 248 of file zoom-query.c.

References ZOOM_query_p::refcount, and ZOOM_API.

Referenced by ZOOM_connection_scan1(), and ZOOM_connection_search().

ZOOM_query_ccl2rpn ( ZOOM_query  s,
const char *  str,
const char *  config,
int *  ccl_error,
const char **  error_string,
int *  error_pos 
)
ZOOM_query_cql ( ZOOM_query  s,
const char *  str 
)
ZOOM_query_cql2rpn ( ZOOM_query  s,
const char *  str,
ZOOM_connection  conn 
)
ZOOM_query_create ( void  )
ZOOM_query_destroy ( ZOOM_query  s)
void ZOOM_query_get_hash ( ZOOM_query  s,
WRBUF  w 
)
const char* ZOOM_query_get_query_string ( ZOOM_query  s)
Z_SortKeySpecList* ZOOM_query_get_sortspec ( ZOOM_query  s)
const char* ZOOM_query_get_sru11 ( ZOOM_query  s)

Definition at line 122 of file zoom-query.c.

References ZOOM_query_p::sru11_sort_spec, wrbuf_cstr(), and wrbuf_len.

Referenced by ZOOM_connection_srw_send_search().

Z_Query* ZOOM_query_get_Z_Query ( ZOOM_query  s)
ZOOM_query_prefix ( ZOOM_query  s,
const char *  str 
)
ZOOM_query_sortby ( ZOOM_query  s,
const char *  criteria 
)

Definition at line 336 of file zoom-query.c.

References ZOOM_API, and ZOOM_query_sortby2().

Referenced by ZOOM_resultset_sort1().

ZOOM_query_sortby2 ( ZOOM_query  s,
const char *  strategy,
const char *  criteria 
)