OrientDB get Edges with shortestPath()
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a Question about the shortestPath() Function of OrientDB. If I Query select shortestPath('#9:1', '#15:1', 'BOTH') against a OrientDB I just get the Vertex of the Path. But I also want the Edges between them. How can I SELECT both, the Vertex and the Edges? 回答1: You can use a javascript function. I used these records I used this code var g=orient.getGraph(); var b=g.command("sql","select expand(shortestPath(" + start + "," + end + ", 'BOTH'))"); var list=[]; for(i=0;i<b.length-1;i++){ var rid1=b[i].getId(); var rid2=b[i+1].getId(); var