use of com.infiniteautomation.mango.db.query.pojo.RQLFilterJsonNode in project ma-modules-public by infiniteautomation.
the class JsonRestController method query.
@RequestMapping(method = RequestMethod.GET, value = "/query/{xid}")
public ArrayWithTotal<Stream<JsonNode>> query(@PathVariable String xid, HttpServletRequest request, ASTNode rql) throws UnsupportedEncodingException {
String path = (String) request.getAttribute(HandlerMapping.PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE);
String pointer = path.endsWith("/") ? "/" : "";
ArrayNode items = this.jsonDataService.valuesForDataAtPointer(xid, pointer);
return new FilteredStreamWithTotal<>(items, new RQLFilterJsonNode(rql));
}
use of com.infiniteautomation.mango.db.query.pojo.RQLFilterJsonNode in project ma-modules-public by infiniteautomation.
the class JsonRestController method queryAtPointer.
@RequestMapping(method = RequestMethod.GET, value = "/query/{xid}/**")
public ArrayWithTotal<Stream<JsonNode>> queryAtPointer(@PathVariable String xid, @ApiIgnore @RemainingPath String path, ASTNode rql) throws UnsupportedEncodingException {
String pointer = "/" + path;
ArrayNode items = this.jsonDataService.valuesForDataAtPointer(xid, pointer);
return new FilteredStreamWithTotal<>(items, new RQLFilterJsonNode(rql));
}
Aggregations