[
https://issues.apache.org/jira/browse/TINKERPOP-1740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16111800#comment-16111800
]
ASF GitHub Bot commented on TINKERPOP-1740:
-------------------------------------------
GitHub user okram opened a pull request:
https://github.com/apache/tinkerpop/pull/686
TINKERPOP-1740: Add vertex parameter overload to to() and from()
https://issues.apache.org/jira/browse/TINKERPOP-1740
Is it me or is it hot out? Oooooowwww...
```
a = g.V(1).next()
b = g.V(2).next()
g.addE('knows').from(a).to(b)
```
We now support `addE()` as a `GraphTraversalSource` method and we support
`to(Vertex)` and `from(Vertex)` which simply default to
`to(__.constant(vertex))` (and `from()` respectively). Gonna vote on it a bit
later, want to get some feedback from @newkek and Jeremy first.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/apache/tinkerpop TINKERPOP-1740
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/tinkerpop/pull/686.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 #686
----
commit 0c92687229955fdb13dc4e3e9a51da1f3b95ae97
Author: Marko A. Rodriguez <[email protected]>
Date: 2017-08-02T21:59:19Z
added support for g.addE().to().from() as well as to(vertex) and
from(vertex). This makes things a little easier on the eyes.
----
> Add vertex parameter overload to to() and from()
> ------------------------------------------------
>
> Key: TINKERPOP-1740
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1740
> Project: TinkerPop
> Issue Type: Improvement
> Components: process
> Reporter: Marko A. Rodriguez
> Assignee: Marko A. Rodriguez
>
> Make it possible to do this:
> {code}
> a = g.V(1).next()
> b = g.V(2).next()
> g.V(a).addE("friend").to(b)
> {code}
> This will work {{withRemote()}} given that detached elements are re-attached
> prior to usage with {{AddEdgeStep}}.
> Right now you have to do the above with the ugly {{withSideEffects}} prefix
> appendage.
> {code}
> a = g.addV().next()
> b = g.addV().next()
> g.withSideEffect('b',b).V(a).addE('friend').to('b')
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)