graph icon indicating copy to clipboard operation
graph copied to clipboard

Update coalesce example for best practice

Open bechbd opened this issue 3 years ago • 0 comments

For the example shown here: https://kelvinlawrence.net/book/Gremlin-Graph-Guide.html#upsert

This would be simpler if written as below since the same property value is being set.

g.V(3).fold().
       coalesce(unfold(),
       addV('airport')).property('runways',3)

It would also be good to show an example where you set different properties on create versus update portions of this pattern.

bechbd avatar Apr 21 '21 22:04 bechbd