moaxcp / graph-dsl

A groovy dsl for creating and traversing graphs.
https://moaxcp.github.io/graph-dsl/
MIT License
27 stars 6 forks source link

Rework EdgeSpec And Edge Methods #69

Closed moaxcp closed 7 years ago

moaxcp commented 7 years ago

edge methods

edge(String, String)
edge(VertexSpec, VertexSpec)
edge(Map)
edge(String, String, Map)
edge(VertexSpec, VertexSpec, Map)
edge(String, String, Closure)
edge(VertexSpec, VertexSpec, Closure)
edge(Map, Closure)
edge(String, String, Map, Closure)
edge(VertexSpec, VertexSpec, Map, Closure)
edge(EdgeSpec)

All methods create an EdgeSpec then call edge(EdgeSpec). Methods that take VertexSpec will allow for code like this

edge(step1, step2)

Strings are not required because propertyMissing returns a VertexSpec with name set to the missing name.

EdgeSpecRunner

Runs the closure in a EdgeSpec.