[ 
https://issues.apache.org/jira/browse/TINKERPOP-1329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15320695#comment-15320695
 ] 

Marko A. Rodriguez commented on TINKERPOP-1329:
-----------------------------------------------

Huh. I like your {{where().by()}}, however, it would have to be a {{by()}} on 
{{P}} unless you could have multi-{{by}}.

{code}
g.V().as("a").out().where(gt("a")).by("age") // both a and current ages are 
selected
g.V().as("a").out().as("b").where("b",gt("a")).by("age") // both a and b ages 
are selected
g.V().as("a").out().as("b").where("b",gt("a")).by("age").by("weight") // where 
b.age > a.weight
{code}

I dunno, I don't think its "too abstract" ... would that be helpful?

{code}
g.V().as("a").out().as("b").where(as("a").out("knows").as("b")).by(out("mother"))
 // do the mothers of a and b know each other?
{code}

The above is perhaps a bit too extreme as you can represent that as:

{code}
g.V().as("a").out().as("b").where(as("a").out("mother").out("knows").in("mother").as("b"))
{code}

...perhaps if its a Traversal-based {{where()}}, {{by()}}-modulation doesn't 
work... ??...........

Anywho, this is tangential to this ticket about {{Paramters}}. If you feel 
{{by()}}-modulation on {{where()}} would be good, please make a ticket.

> 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