![](/img/trans.png)
[英]How to get the properties of two or more vertices in one Gremlin query?
[英]In Gremlin, how to query two or more vertices with same value on one property?
您必須掃描頂點兩次。 通過當前的遍歷,您只需將每個頂點與其自身進行比較。
g.V().hasLabel("Person").as("a").
V().hasLabel("Person").as("b").
where("a", P.eq("b")).by("name").
where("a", P.neq("b"))
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.