tinkerpop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kuppitz (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TINKERPOP3-762) Allow mid-traversal V() (and E())
Date Mon, 03 Aug 2015 17:10:05 GMT

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

Daniel Kuppitz commented on TINKERPOP3-762:
-------------------------------------------

For each incoming object; it's just a simple flatMap.

[~mhfrantz]: You won't need those complicated match patterns:

*Query 1:*

{code}
g.V().hasLabel('company').as('c','cv').
  V().hasLabel('person').as('p','pv').dedup('c','p').
  select('c','p').by('cname').by('pname').where('c', eq('p')).
  addOutE('pv', 'worksFor', 'cv')
{code}

*Query 2:*

{code}
g.V().hasLabel('person').as('a').
  V().hasLabel('person').as('b').
  where('a', neq('b')).
  addOutE('a', 'relatesTo', 'b').
  addOutE('b', 'relatesTo', 'a')
{code}


> Allow mid-traversal V() (and E())
> ---------------------------------
>
>                 Key: TINKERPOP3-762
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP3-762
>             Project: TinkerPop 3
>          Issue Type: Improvement
>          Components: process
>    Affects Versions: 3.0.0-incubating
>            Reporter: Daniel Kuppitz
>            Assignee: Marko A. Rodriguez
>
> We should allow mid-traversal {{V()}} and {{E()}}. It shouldn't be a technical problem,
since we always know the traversal source, thus it's just a simple {{flatMap}}. Vendors could
then implement mid-traversal global index lookups.
> *Example*:
> {code}
> g.V().hasLabel("company").has("name", "DataStax").in("worksFor").as("dse").
>   V().hasLabel("company").has("name", "Aurelius").in("worksFor").as("ae").
>       addOutE("dse", "knows", "ae", "since", "02/2015")
> {code}



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

Mime
View raw message