use of org.apache.tinkerpop.gremlin.driver.message.ResponseMessage in project cypher-for-gremlin by opencypher.
the class CypherOpProcessor method explainQuery.
private void explainQuery(Context context, CypherAstWrapper ast, String gremlin) {
Map<String, Object> explanation = new LinkedHashMap<>();
explanation.put("translation", gremlin);
explanation.put("options", ast.getOptions().toString());
ResponseMessage explainMsg = ResponseMessage.build(context.getRequestMessage()).code(ResponseStatusCode.SUCCESS).statusMessage("OK").result(singletonList(explanation)).create();
ChannelHandlerContext ctx = context.getChannelHandlerContext();
ctx.writeAndFlush(explainMsg);
}
Aggregations