-
- error = cql_transform_buf(trans, node, pqfbuf, sizeof pqfbuf);
- cql_parser_destroy(parser);
- cql_node_destroy(node);
- if (error != 0) {
- char buf[512];
- const char *addinfo;
- error = cql_transform_error(trans, &addinfo);
+ else
+ {
+ WRBUF wrbuf_result = wrbuf_alloc();
+ error = cql_transform(trans, cql_parser_result(parser),
+ cql2pqf_wrbuf_puts, wrbuf_result);
+ if (error != 0) {
+ char buf[512];
+ const char *addinfo;
+ error = cql_transform_error(trans, &addinfo);
+ sprintf(buf, "%.200s (addinfo=%.200s)",
+ cql_strerror(error), addinfo);
+ set_ZOOM_error(c, ZOOM_ERROR_CQL_TRANSFORM, buf);
+ }
+ else
+ {
+ result = xstrdup(wrbuf_cstr(wrbuf_result));
+ }