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

ASF GitHub Bot commented on TINKERPOP-1330:
-------------------------------------------

Github user dkuppitz commented on the issue:

    https://github.com/apache/tinkerpop/pull/417
  
    Regarding the `match()` translation, it's indeed very easy:
    
    ```
    gremlin> g.V().as("a").outE("created").as("b").
    ......1>  inV().as("c").in("created").as("d").
    ......2>    match(
    ......3>      __.as("a").values("age").as("a_by"),
    ......4>      __.as("b").values("weight").as("b_by"),
    ......5>      __.as("c").in("created").values("age").min().as("c_by"),
    ......6>      __.as("d").values("age").as("d_by"),
    ......7>    ).
    ......8>  where("a_by", lt("b_by").or(gt("c_by")).and(neq("d_by"))).
    ......9>  select("a", "c", "d").by("name")
    ==>[a:josh,c:lop,d:marko]
    ==>[a:josh,c:lop,d:peter]
    ==>[a:peter,c:lop,d:marko]
    ==>[a:peter,c:lop,d:josh]
    ```
    
    I will make a code review and vote tomorrow.


> by()-modulation for where()
> ---------------------------
>
>                 Key: TINKERPOP-1330
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1330
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: process
>    Affects Versions: 3.2.1
>            Reporter: Daniel Kuppitz
>            Assignee: Marko A. Rodriguez
>
> As discussed in https://issues.apache.org/jira/browse/TINKERPOP-1329, it 
> would be nice to have {{by()}}-modulators for {{where()}}. For example:
> {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}



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

Reply via email to