GitHub user okram opened a pull request:
https://github.com/apache/tinkerpop/pull/724
TINKERPOP-1793: addE() should allow dynamic edge labels
https://issues.apache.org/jira/browse/TINKERPOP-1793
There are a few changes here:
1. `addV(traversal)` and `addE(traversal)` added to both `GraphTraversal`
and `GraphTraversalSource`. Thus, the label of the respectively created element
can be dynamically determined.
2. Added the above methods as well as `addE(String)` to the traversal
source of `GremlinDslProcessor`. The missing `addE(String)` method was a bug.
3. Changed `to()` and `from()` from taking a `Traversal` to
`Traversal`. This reduces type coercion.
Added various test cases to validate proper functioning.
VOTE +1.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/apache/tinkerpop TINKERPOP-1793
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/tinkerpop/pull/724.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 #724
commit bd2c3b27059a50b87960a5bf270c5b9633bb8edc
Author: Marko A. Rodriguez
Date: 2017-09-27T16:05:16Z
first push of working addV(traversal) and addE(traversal). I have only
written one test case thus far. However, taking a break and pushing what I
have. Need to write about 3 more test cases to be confident.
commit f0dc7ff5d72e4ba8532326fe9b99c35b476f4b09
Author: Marko A. Rodriguez
Date: 2017-09-27T16:55:56Z
added GraphTraversalSource.addV(traversal) and
GraphTraversalSource.addE(traversal). Added 2 more test cases. One more to go.
Updated upgrade docs accordingly.
commit 8ff6bdf44d6a3bc922723c0646b5ad39c3c80268
Author: Marko A. Rodriguez
Date: 2017-09-27T17:36:53Z
changed the typing of from() and to() to accept wildcard instead of E as
the start. this reduces nasty type coersion. Added final addE() test case.
Updated GremlinDSLProcessor to handle g.addE() and new addV()/addE() traversal
methods accordingly.
commit 1f76f1e9b1bb3bd980cd3b143228a2c324220477
Author: Marko A. Rodriguez
Date: 2017-09-27T17:54:17Z
updated upgrade docs.
---