© 2026 Hedgehog Software, LLC
mergeE()
counter += 1
g.mergeE([(T.label):'called', (from): person1, (to):person2]). option(Merge.onCreate,['num_calls': 1]). option(Merge.onMatch,['num_calls': X+1])
X
num_calls
gremlin> g.mergeE([(Direction.from):44,(Direction.to):8]).valueMap(true) ==>[id:5062,label:route,dist:549]
gremlin> g.mergeE([(Direction.from):44,(Direction.to):8]). ......1> option(onMatch,property('dist',union(values('dist'), __.constant(1)).sum()).constant([:])).valueMap(true) ==>[id:5062,label:route,dist:550]
Join the Discord to ask follow-up questions and connect with the community
Apache TinkerPop is an open source graph computing framework and the home of the Gremlin graph query language.
1,383 Members