Neo4j Cypher: How to iterate over ExecutionResult result

前端 未结 4 1473
深忆病人
深忆病人 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:54

    Iterator columnAs = result.columnAs("n");
    while(columnAs.hasNext())
    {
    Node n = (Node)columnAs.next();
    for (String key : n.getPropertyKeys()) {
    sysout("{ " + key + " : " + n.getProperty(key)+ " } ");
    }
    
    
    

    This might help you out

    提交回复
    热议问题