我有一个场景,我在更新遍历过程中想要检查一个条件,如果该条件为假,我想中断遍历并保持图形不变。另外我想知道遍历被跳过,所以我可以向调用代码抛出异常。
约束:
我需要在一次遍历中完成此操作,因为我使用的图形数据库服务无法在多次遍历中保存事务。
我确实需要一种方法来确定遍历被中断的原因。
此外,我似乎无法使用 sideEffect() 步骤 (?),因为这似乎与 gremlin 查询的序列化无关。
主要穿越的作品在本地使用TinkerGraph而不是部署为拉姆达invocing AWS海王星。
GraphTraversalSource g = graph.traversal();
g.V().hasLabel("ops").fold()
.coalesce(
unfold(),
sideEffect(t -> { throw new RuntimeException("First vertice not found"); }))
.as("a")
// do much more stuff
.hasNext();
sideEffect(org.someone.graph.ClassImpl$$Lambda$155/352598575@1b7f1140)]],aliases={g=g}}}] 无法被 org.apache.tinkerpop.gremlin.driver.ser.AbstractGryoMessageSerializerV3d0 序列化。
不负相思意
相关分类