Stephen Mallette created TINKERPOP-2466:
-------------------------------------------

             Summary: Improve syntax for Groovy scripts that use 
withStrategies()
                 Key: TINKERPOP-2466
                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2466
             Project: TinkerPop
          Issue Type: Improvement
          Components: groovy
    Affects Versions: 3.4.8
            Reporter: Stephen Mallette
            Assignee: Stephen Mallette


This issue grew out of TINKERPOP-2461 which noted issues with aligning imports 
to the {{GroovyTranslator}}. A more Groovy syntax for {{withStrategies()}} will 
help make script submission have a more unified, compact and consistent feel 
while not affecting the Java syntax which relies more on the type safe and IDE 
friendly builder pattern. 

{code}
gremlin> g = TinkerFactory.createTheCrew().traversal()
==>graphtraversalsource[tinkergraph[vertices:6 edges:14], standard]
gremlin> g = g.withStrategies(ReadOnlyStrategy, new
SubgraphStrategy(vertexProperties: __.hasNot('endTime')))
==>graphtraversalsource[tinkergraph[vertices:6 edges:14], standard]
gremlin> g.V().as('a').values('location').as('b').
......1>   select('a','b').by('name').by()
==>[a:marko,b:santa fe]
==>[a:stephen,b:purcellville]
==>[a:matthias,b:seattle]
==>[a:daniel,b:aachen]
{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to