通过 Gremlin 接口将边添加到 Janusgraph
Adding Edge to Janusgraph via Gremlin interface
谁能解释为什么这似乎没有任何作用
ve = g.addV("test").as("m").iterate()
g.addV("test2").as("q").V(ve).addE("contains").from("q").iterate()
g.V().hasLabel("test2").outE().otherV().path()
操作执行无误,但在请求边缘时 return 没有任何结果。
我知道我可以将遍历连接在一起,但我正在专门查看一个用例,在该用例中我将在稍微不同的代码块中创建第一个顶点。
知道了:
ve = g.addV("test").as("m").iterate()
应该是
ve = g.addV("test").as("m").next()
谁能解释为什么这似乎没有任何作用
ve = g.addV("test").as("m").iterate()
g.addV("test2").as("q").V(ve).addE("contains").from("q").iterate()
g.V().hasLabel("test2").outE().otherV().path()
操作执行无误,但在请求边缘时 return 没有任何结果。
我知道我可以将遍历连接在一起,但我正在专门查看一个用例,在该用例中我将在稍微不同的代码块中创建第一个顶点。
知道了:
ve = g.addV("test").as("m").iterate()
应该是
ve = g.addV("test").as("m").next()