我正在试验 TinkerPop3 文档中的遍历示例。在Gremlin shell中用,加载了经典图:g = TinkerFactory.createClassic()
gremlin> marko = g.v(1)
==>v[1]
gremlin> marko
==>v[1]
然而:
gremlin> marko = g.V().has('name', 'marko')
==>v[1]
gremlin> marko
gremlin>
为什么第二种形式不捕获v[1]
?
给定第二种形式,尝试使用变量会导致错误:
gremlin> marko.out('knows')
The traversal strategies are complete and the traversal can no longer have steps added to it
Display stack trace? [yN]