I am using AWS Neptune and I have to modify a certain property of a set of EDGEs with specific values. I also need this done in a single transaction. In AWS Neptune, manual transaction logic using tx.commit()
and tx.rollback()
is not supported. Which means I have to do this operation in a single traversal.
If I was to modify properties of vertices instead of edges, I could have got it done with a query similar to the following one:
g.V(<id 1>).property('name', 'Marko').V(<id 2>).property('name', 'Stephen');
This is because it is possible to select vertices by id in mid traversal, i.e. the GraphTraversal
class has V(String ... vertexIds)
as a member function.
But this is not the same for the case of edges. I am not able to select edges this way because E(String ... edgeIds)
is not a member function of the GraphTraversal
class.
Can somebody suggest the correct way I can solve this problem?
Thank you.