Gremlin-更新多个边的值

问题描述 投票:1回答:1

我正在使用AWS Neptune,并且必须使用特定值修改一组EDGE的某些属性。我还需要在单个事务中完成此操作。在AWS Neptune中,manual transaction logic using tx.commit() and tx.rollback() is not supported。这意味着我必须在单个遍历中执行此操作。

如果我要修改顶点的属性而不是边缘,我可以通过与以下查询类似的查询来完成:

tx.commit()

这是因为可以在中间遍历时通过id选择顶点,即tx.rollback()类具有g.V(<id 1>).property('name', 'Marko').V(<id 2>).property('name', 'Stephen'); 作为成员函数。

但是对于边的情况则不同。我无法以这种方式选择边,因为GraphTraversal不是V(String ... vertexIds)类的成员函数。

有人可以建议我解决此问题的正确方法吗?

谢谢。

graph-databases gremlin gremlin-server amazon-neptune
1个回答
0
投票
Amazon Neptune引擎1.0.1.0.200463.0添加了E(String ... edgeIds),以允许在单个事务中执行多个Gremlin遍历。
© www.soinside.com 2019 - 2024. All rights reserved.