-int zebra_scan (ZebraHandle zh, ODR stream, Z_AttributesPlusTerm *zapt,
- oid_value attributeset,
- int *position, int *num_entries, ZebraScanEntry **entries,
- int *is_partial)
+ZEBRA_RES zebra_scan_PQF(ZebraHandle zh, ODR stream, const char *query,
+ int *position,
+ int *num_entries, ZebraScanEntry **entries,
+ int *is_partial,
+ const char *setname)
+{
+ YAZ_PQF_Parser pqf_parser = yaz_pqf_create ();
+ Z_AttributesPlusTerm *zapt;
+ int *attributeSet;
+ ZEBRA_RES res;
+
+ if (!(zapt = yaz_pqf_scan(pqf_parser, stream, &attributeSet, query)))
+ {
+ res = ZEBRA_FAIL;
+ zh->errCode = YAZ_BIB1_SCAN_MALFORMED_SCAN;
+ }
+ else
+ res = zebra_scan(zh, stream, zapt, VAL_BIB1,
+ position, num_entries, entries, is_partial,
+ setname);
+ yaz_pqf_destroy (pqf_parser);
+ return res;
+}
+
+ZEBRA_RES zebra_scan(ZebraHandle zh, ODR stream, Z_AttributesPlusTerm *zapt,
+ oid_value attributeset,
+ int *position,
+ int *num_entries, ZebraScanEntry **entries,
+ int *is_partial,
+ const char *setname)