【发布时间】:2014-12-28 05:58:02
【问题描述】:
我正在尝试使用 gremlin-java 驱动程序在 Scala 中的 has 调用中使用 T.in 令牌。我试过传递一个数组、列表、集合、序列和一个字符串,但无论我发送什么,我都会收到这个错误,
Execution exception[[IllegalArgumentException: Invalid condition: Set(typeA, typeB)]]
我正在尝试这样做,
new GremlinPipeline(g).V().has("type",T.in, Set("typeA", "typeB"))
在直接 Gremlin 中,g.V().has("type", T.in, ["typeA","typeB"]) 工作正常,但我无法让它与 gremlin-java 驱动程序一起使用。
has() 的签名是,GremlinFluentPipeline<S,? extends com.tinkerpop.blueprints.Element> has(String key, Tokens.T compareToken, Object value)
参数:
key - 要检查的属性键
compareToken - 要使用的比较
value - 要过滤的对象
但我不知道如何传递值才能被接受。
gremlin-java 2.6.0 (docs)
斯卡拉 2.11.1
泰坦 0.5.2
感谢您的帮助。
【问题讨论】: