Hello,

Assume the following graph.

g = TinkerGraph.open().traversal()
g.addV().property(id,1).property('op','g.').as('g.').
  addV().property('op','V(1).').as('V(1).').
  addV().property('op','repeat(').as('repeat(').
  addV().property('op','out()).').as('out()).').
  addV().property('op','times(4).').
         property('name',"x",'op',"properties('name')").as('times(4).').
  addE('link').from('g.').to('V(1).').
  addE('link').from('V(1).').to('repeat(').
  addE('link').from('repeat(').to('out()).').
  addE('link').from('out()).').to('times(4).')



Next, assume the following traversal:

g.V(1).repeat(out()).times(4).properties('name')

Look at the path that is traversed when the above traversal is executed against 
the above graph.

gremlin> g.V(1).repeat(out()).times(4).properties('name').path().by('op')
==>[g.,V(1).,repeat(,out()).,times(4).,properties('name')]

This is a traversal that writes itself out.

Marko.

http://markorodriguez.com



Reply via email to