首页 > 解决方案 > OrientDB SQL 中等效的 Tinkerpop path() 步骤

问题描述

我在 Tinkerpop/Gremlin 中有以下工作查询,它​​可以返回遍历到当前步骤的元素的有序列表。如何在 OrientDB SQL 中制作类似的查询?

g.V().hasLabel('Firma').has('cui','13904073').until(hasLabel('Persoana')).repeat(inE('Actionar').otherV()).sack().path()

我在 OrientDB 中使用 MATCH 进行了类似的遍历,但我找不到一种方法来获取遍历的元素的有序列表:

MATCH{class:Firma,as: FirmaBaza,where:(cui=13904073)}.(inE("Actionar") {as:actEdge}.outV()) {as:act,where:($matched.FirmaBaza!= $currentMatch and @class=="Firma"),while:(true)}.in("Actionar") {as:actPers,where:(@class=="Persoana")} return $pathElements

有没有办法使用 OrientDB SQL 获取遍历元素的有序列表?

标签: orientdbtinkerpop3

解决方案


推荐阅读