Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.1.0-incubating
Description
I just realized something so obvious. TraversalSource should be fluent and not this awkward TraversalSource.Builder model we use. You should be able to do this:
graph = GraphFactory.open(...) g = graph.traversal() g = g.withStrategy(MyStrategy.class) g = g.withSack(1.0,sum) ... g.V().out().sack() g.V().out().out().drop()
Thus, TraversalSource methods return a TraversalSource.
g = graph.traversal(computer(GiraphGraphComputer)).withStrategy(MyStrategy.class).withSack(1.0,sum).withBulk(false)
That g is then "locked" with those parameterizations and any V()/addV()/etc. off of it will spawn traversal with that parameterization.
This solves:
TINKERPOP3-862
TINKERPOP3-960 (makes more elegant)
This would be backwards compatible. Though, deprecation would occur.
Finally, DSLs are still respected.
g = graph.traversal(SocialTraversal.class)
A fleeting thought...
g = graph.traversal().using(GiraphGraphComputer) g = graph.traversal().via(GremlinServerConnection).using(GiraphGraphComputer)
So much cleaner than all that Builder-crap....
Attachments
Issue Links
- is depended upon by
-
TINKERPOP-575 Implement RemoteGraph
- Closed