【发布时间】:2020-06-17 12:54:42
【问题描述】:
我正在尝试使用 C# Datastax CassandraCSharpDriver.Graph 代码获取通过边连接到已知顶点的所有未知顶点。
此 gremlin 代码正确返回未知顶点列表以及目标已知顶点:
g.V().has("mything","key", "mykey")
.emit()
.repeat(outE("contains").inV()).valueMap(true)
我在 C# 中尝试过这样的遍历,但它没有返回,我认为重复是无限的(或非常慢):
g.V()
.Has("mything", "key", "mykey")
.Emit()
.Repeat(g.V()
.Has("mything", "key", "mykey")
.OutE("contains").InV())
我正在 C# 中尝试这样的遍历,但编译器不接受 '("query")',所以我不确定如何将遍历放入 Repeat 子句:
g.V()
.Has("mything", "key", "mykey")
.As("query").Emit()
.Repeat(("query").OutE("contains").InV())
Repeat 子句有什么技巧?或者有没有更好的方法让所有未知顶点连接到 C# 中的已知顶点?
【问题讨论】:
标签: c# datastax-enterprise-graph