You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/03/16 16:12:41 UTC

[jira] [Commented] (TINKERPOP-1387) from and to modulators for path steps

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

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

GitHub user okram opened a pull request:

    https://github.com/apache/tinkerpop/pull/574

    TINKERPOP-1387: from and to modulators for path steps

    https://issues.apache.org/jira/browse/TINKERPOP-1387
    
    `path()`, `simplePath()`, and `cyclicPath()` now all support `to()`-, `from()`-, and `by()`-modulation. Support for `to()`/`from()` modulation is made possible by a new interface `FromToModulating` which `AddEdgeStep` now implements. To isolate sub-paths, `Path.subPath(String,String)` was added to `Path` interface with a default implementation. Added respective tests and documentation updates.
    
    @dkuppitz -- can you give this bad boy a whirl. Also, if you come up with a some cool doc examples during your play, can you add them please?
    
    VOTE +1.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apache/tinkerpop TINKERPOP-1387

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/tinkerpop/pull/574.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #574
    
----
commit 9265ddf6d1e5bded0ef6b3a0229ea1ce405e5259
Author: Marko A. Rodriguez <ok...@gmail.com>
Date:   2017-03-16T14:40:39Z

    added support for Path.getSubPath(). Added FromToModulating for from() and to()-based step modulations. Added support for path().from().to(). Added respective test cases. Going to add simplePath().from().to().by() and cyclicPath().from().to().by() to this ticket as well and then PR this mo fo ya know.

commit 0fe3b1d8f4b49db80a59e9d29d8082735edfcef4
Author: Marko A. Rodriguez <ok...@gmail.com>
Date:   2017-03-16T14:44:43Z

    Cleaned up and added JavaDoc for now sub-path work.

commit 65b3ad06b15b75ae944c11bfbdc592994fa706b2
Author: Marko A. Rodriguez <ok...@gmail.com>
Date:   2017-03-16T15:14:40Z

    removed CyclicPathStep and SimplePathStep for a more abstract, generalized step called PathFilterStep which handles cyclic/simple filtering as well as to() and from() modulation. Updated UPGRADE docs. Will add by()-modulation to PathFilterStep next.

commit 936344f33f62fd3b3d7adee6bf0bf8fb11b8e5e5
Author: Marko A. Rodriguez <ok...@gmail.com>
Date:   2017-03-16T15:26:45Z

    added to()/from() test support for cyclicPath() and added to()/from() example to the-traversal.asciidoc.

commit 8ec49c433ae472116853df12247fa903e41f958d
Author: Marko A. Rodriguez <ok...@gmail.com>
Date:   2017-03-16T15:34:25Z

    PathFilterStep now support by() modulation. Removed unneeded CyclicPathStepTest and SimplePathStepTest.

commit 35ecf8c0f56139953187769ee719c95b66cfa477
Author: Marko A. Rodriguez <ok...@gmail.com>
Date:   2017-03-16T16:03:28Z

    added test support for simplePath() and cyclicPath() by()/to()/from(). Really cool. Works great and makes sense. Updated this-traversal.asciidoc with examples.

commit 9155c464b78abfe0772d1c8e12ba4196d829e28b
Author: Marko A. Rodriguez <ok...@gmail.com>
Date:   2017-03-16T16:05:17Z

    updated CHANGELOG.

commit 718a29bb6ff5a2f5294cd3629b616fb615bc3e15
Author: Marko A. Rodriguez <ok...@gmail.com>
Date:   2017-03-16T16:07:30Z

    renamed Path.getSubPath() to Path.subPath() as its in the fluent style of operations on Path.

commit a9c2f65e0557dfd5f486b2ba683c571bb60f5fe6
Author: Marko A. Rodriguez <ok...@gmail.com>
Date:   2017-03-16T16:07:50Z

    renamed Path.getSubPath() to Path.subPath() as its in the fluent style of operations on Path.

----


> from and to modulators for path steps
> -------------------------------------
>
>                 Key: TINKERPOP-1387
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1387
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: process
>    Affects Versions: 3.2.1
>            Reporter: Daniel Kuppitz
>            Assignee: Marko A. Rodriguez
>
> Just had this crazy idea of {{from}} and {{to}} modulators for path steps.
> {code}
> g.V(1).as("a").
>   repeat(both("knows").simplePath().from("a")).emit().out("created").as("p").in("created").
>   repeat(both("knows").simplePath().from("p")).emit(hasId(6)).out("created").as("b").
>   path().from("a").to("p").as("pathFromMarkoToProject").
>   path().from("p").to("b").as("pathFromProjectToPeter").
>   match(
>     __.as("pathFromMarkoToProject").count(local).is(lte(3)),
>     __.as("pathFromProjectToPeter").count(local).is(lte(3))
>   ).select("p", "pathFromMarkoToProject", "pathFromProjectToPeter")
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)