Marko A. Rodriguez created TINKERPOP-1329:
---------------------------------------------

             Summary: Use Parameters in more steps than just the MutationStep 
library.
                 Key: TINKERPOP-1329
                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1329
             Project: TinkerPop
          Issue Type: Improvement
          Components: process
    Affects Versions: 3.2.1
            Reporter: Marko A. Rodriguez


{{Parameters}} was introduced to provide more expressivity in the mutation API. 
With {{Parameters}}, a step parameter need not be a direct object, but could, 
instead, but a traversal which yields the direct object. For instance:

{code}
g.V().as("a").out().addV("person").property("age",select("a").values("age"))
{code}

That is, the new person age is the age of whatever vertex was labeled "a."

This ability to parameterize steps with runtime traversals is powerful and 
should be used more throughout Gremlin. For instance, it would be cool to be 
able to do things like below:

{code}
g.V().outE().as("e").inV().out(select("e").label())
g.V().as("a").out().has("age",gt(select("a").values("age"))
g.V().groupCount().by(label)
  .order(local).by(values,decr)
  .select(keys).unfold().limit(1)
  V().hasLabel(__.label())
{code}

I think the steps that can best use {{Parameters}} include:

* {{Mutating}}-steps (**done**)
* {{HasStep}}
* {{VertexStep}} (out(), in(), outE(), etc.)
* ??

[~dkuppitz] What do you think given your experience?




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to