我有以下gremlin代码段:
vert.as('x').
both.or(
_().has("time").filter{ _()["time"] > startTime.toInteger() },
_().has("isRead"), _().has("isWrite")).dedup{}.gather.scatter.
store(y).loop('x'){c++ < limit.toInteger()}.iterate();
我认为这会过滤其时间属性值解析为大于startTime的项目。但事实并非如此。如何在管道中获取当前对象的时间以进行比较?
答案 0 :(得分:1)
实际上,我发现答案非常快。我应该知道,因为我已经基本上阅读了所有的gremlin文档...:/
vert.as('x').
both.or(
_().has("time").filter{ it.time > startTime.toInteger() },
_().has("isRead"), _().has("isWrite")).dedup{}.gather.scatter.
store(y).loop('x'){c++ < limit.toInteger()}.iterate();