Neo4j Cypher: How to iterate over ExecutionResult result

前端 未结 4 1491
深忆病人
深忆病人 2020-12-16 22:02

In this code, how could I iterate over all the nodes in the ExecutionResult result?

CypherParser parser = new CypherParser();
ExecutionEngine engine = new Ex         


        
4条回答
  •  清歌不尽
    2020-12-16 22:57

    for (Map row : result) {
       Node x = (Node)row.get("x");
       for (String prop : x.getPropertyKeys()) {
          System.out.println(prop +": "+x.getProperty(prop));
       }
    }
    

提交回复
热议问题