YAZ  5.23.1
Functions
rpn2cql.h File Reference

Header for RPN to CQL tranform. More...

#include <yaz/z-core.h>
#include <yaz/cql.h>
#include <yaz/wrbuf.h>

Go to the source code of this file.

Functions

int cql_transform_rpn2cql_stream_r (cql_transform_t ct, WRBUF addinfo, void(*pr)(const char *buf, void *client_data), void *client_data, Z_RPNQuery *q)
 transforms RPN query to CQL output stream (re-entrant) More...
 
int cql_transform_rpn2cql_stream (cql_transform_t ct, void(*pr)(const char *buf, void *client_data), void *client_data, Z_RPNQuery *q)
 transforms RPN query to CQL output stream (NOT re-entrant) More...
 
int cql_transform_rpn2cql_wrbuf (cql_transform_t ct, WRBUF w, Z_RPNQuery *q)
 transforms RPN query to CQL WRBUF (NOT re-entrant) More...
 
const char * cql_lookup_reverse (cql_transform_t ct, const char *category, Z_AttributeList *attributes)
 find a pattern that has a subset of attributes More...
 

Detailed Description

Header for RPN to CQL tranform.

Definition in file rpn2cql.h.

Function Documentation

const char* cql_lookup_reverse ( cql_transform_t  ct,
const char *  category,
Z_AttributeList attributes 
)

find a pattern that has a subset of attributes

Parameters
ctCQL transform handle
categorypattern category
attributesRPN attributes
Returns
pattern value or NULL if not found

Definition at line 322 of file cqltransform.c.

References cql_prop_entry::attr_list, Z_AttributeList::attributes, Z_AttributeElement::attributeSet, compare_attr(), cql_transform_t_::entry, cql_prop_entry::next, Z_AttributeList::num_attributes, oid_oidcmp(), cql_prop_entry::pattern, and yaz_oid_attset_bib_1.

Referenced by rpn2cql_attr(), and solr_lookup_reverse().

int cql_transform_rpn2cql_stream ( cql_transform_t  ct,
void(*)(const char *buf, void *client_data)  pr,
void *  client_data,
Z_RPNQuery q 
)

transforms RPN query to CQL output stream (NOT re-entrant)

Parameters
ctCQL transform handle
prprint function
client_dataopaque data to be passed to print handler
qRPN Query
Return values
0success
!=0failure (error code)

Definition at line 368 of file rpn2cql.c.

References cql_transform_rpn2cql_stream_r(), cql_transform_set_error(), wrbuf_alloc(), wrbuf_cstr(), wrbuf_destroy(), and wrbuf_len.

Referenced by cql_transform_rpn2cql_wrbuf().

int cql_transform_rpn2cql_stream_r ( cql_transform_t  ct,
WRBUF  addinfo,
void(*)(const char *buf, void *client_data)  pr,
void *  client_data,
Z_RPNQuery q 
)

transforms RPN query to CQL output stream (re-entrant)

Parameters
ctCQL transform handle
addinfofor additional error info
prprint function
client_dataopaque data to be passed to print handler
qRPN Query
Return values
0success
!=0failure (error code)

Definition at line 354 of file rpn2cql.c.

References rpn2cql_structure(), Z_RPNQuery::RPNStructure, and wrbuf_rewind().

Referenced by cql_transform_rpn2cql_stream().

int cql_transform_rpn2cql_wrbuf ( cql_transform_t  ct,
WRBUF  w,
Z_RPNQuery q 
)

transforms RPN query to CQL WRBUF (NOT re-entrant)

Parameters
ctCQL transform handle
wWRBUF handle for result
qRPN Query
Return values
0success
!=0failure (error code)

Definition at line 382 of file rpn2cql.c.

References cql_transform_rpn2cql_stream(), and wrbuf_vp_puts().