Skip to content

Instantly share code, notes, and snippets.

@if6was9
Last active September 13, 2018 03:02
Show Gist options
  • Select an option

  • Save if6was9/b8095e421a390cd78603bfdc6313f8a0 to your computer and use it in GitHub Desktop.

Select an option

Save if6was9/b8095e421a390cd78603bfdc6313f8a0 to your computer and use it in GitHub Desktop.
merge edges between vertices
Edge edge = graph.traversal()
.V().hasLabel("Person").has("name","Rob").as("p")
.V().hasLabel("Dog").has("name","Homer").as("d")
.coalesce(
__.inE( "HAS" ).where(__.outV().as("p")) ,
__.addE("HAS").from("p"))
.tryNext().get();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment