目前有一个密码查询方法
public static void RunQuery(String _query)
{
Properties prop = new Properties();
final String DB_PATH = "path/to/db"
GraphDatabaseService graphDb = new GraphDatabaseFactory().newEmbeddedDatabase(DB_PATH);
ExecutionEngine engine = new ExecutionEngine(graphDb);
ExecutionResult result = engine.execute(_query);
for(Map<String,Object> map : result)
{
System.out.println(map.toString());
}
graphDb.shutdown();
}
然而,这只允许我得到这样的结果:
{a=Node[11303]}
{a=Node[11341]}
{a=Node[11343]}
{a=Node[11347]}
{a=Node[11349]}
{a=Node[11378]}
如何增强它以像 cypher shell 一样吐出整个查询结果?