Reputation: 313
I tried Gremlin Tinkerpop query for Amazon neptune to drop properties of Vertex. It is working fine, but couldn't get acknowledgement either TRUE / FALSE on dropping properties.
But, i could manage get boolean for updating / adding properties of the Vertex
g.V('id').properties('property_1','property_2').drop()
I'm expecting it to return TRUE / FALSE on successful query execution.
It would be more helpful if someone gives heads Up on this.
Note: Since trying CompletableFuture for Query execution, looking on boolean result on successful execution.
Upvotes: 1
Views: 983
Reputation: 313
I had a workaround / solution on this as check if properties are there after drop on the same chain. If there is no properties, then it succeeds the dropping of properties.
Note: Traverse and check it has properties to validate!
Upvotes: 0
Reputation: 14371
The way to know whether or not the drop
worked is whether or not the transaction succeeded or failed. If the drop fails an exception will be thrown that you can catch. If you look at the Apache TinkerPop documentation for the drop
step [1] you will see that:
The drop()-step (filter/sideEffect) is used to remove element and properties from the graph (i.e. remove). It is a filter step because the traversal yields no outgoing objects.
[1] http://tinkerpop.apache.org/docs/3.4.6/reference/#drop-step
I hope that helps clarify
Upvotes: 2