You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by dk...@apache.org on 2019/06/17 21:40:38 UTC
[tinkerpop] branch TINKERPOP-1084 updated (9fc45cf -> 4c0c47b)
This is an automated email from the ASF dual-hosted git repository.
dkuppitz pushed a change to branch TINKERPOP-1084
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.
from 9fc45cf added more tests
new 43f49df updated upgrade docs
new 4c0c47b fixed missing __
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
docs/src/upgrade/release-3.3.x.asciidoc | 30 +++++++++++++++++++++++++++++
gremlin-test/features/branch/Branch.feature | 2 +-
2 files changed, 31 insertions(+), 1 deletion(-)
[tinkerpop] 01/02: updated upgrade docs
Posted by dk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
dkuppitz pushed a commit to branch TINKERPOP-1084
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit 43f49df454ffbff4e3ceb735590932992c1ddb7c
Author: Daniel Kuppitz <da...@hotmail.com>
AuthorDate: Mon Jun 17 14:37:42 2019 -0700
updated upgrade docs
---
docs/src/upgrade/release-3.3.x.asciidoc | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/docs/src/upgrade/release-3.3.x.asciidoc b/docs/src/upgrade/release-3.3.x.asciidoc
index 51da497..d0fdfb4 100644
--- a/docs/src/upgrade/release-3.3.x.asciidoc
+++ b/docs/src/upgrade/release-3.3.x.asciidoc
@@ -27,6 +27,36 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
Please see the link:https://github.com/apache/tinkerpop/blob/3.3.8/CHANGELOG.asciidoc#release-3-3-8[changelog] for a complete list of all the modifications that are part of this release.
+== Upgrading for Users
+
+==== Branch Steps accept Predicates and Traversals
+
+Prior to this version, branch steps (in particular `BranchStep` and `ChooseStep`) could only handle constant values and `Pick` tokens. Starting in this version, these steps will also accept
+predicates and traversals as show in the example below.
+
+[source,text]
+----
+gremlin> g = TinkerFactory.createModern().traversal()
+==>graphtraversalsource[tinkergraph[vertices:6 edges:6], standard]
+gremlin> g.V().hasLabel("person").
+......1> group().
+......2> by("name").
+......3> by(branch(values("age")).
+......4> option(29, constant("almost old")).
+......5> option(__.is(32), constant("looks like josh")).
+......6> option(lt(29), constant("pretty young")).
+......7> option(lt(35), constant("younger than peter")).
+......8> option(gte(30), constant("pretty old")).
+......9> option(none, constant("mysterious")).fold()).
+.....10> unfold()
+==>peter=[pretty old]
+==>vadas=[pretty young, younger than peter]
+==>josh=[looks like josh, younger than peter, pretty old]
+==>marko=[almost old, younger than peter]
+----
+
+See: link:https://issues.apache.org/jira/browse/TINKERPOP-1084[TINKERPOP-1084]
+
== TinkerPop 3.3.7
[tinkerpop] 02/02: fixed missing __
Posted by dk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
dkuppitz pushed a commit to branch TINKERPOP-1084
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit 4c0c47bbabae461ada82338a47abcfa57e76553f
Author: Daniel Kuppitz <da...@hotmail.com>
AuthorDate: Mon Jun 17 14:40:27 2019 -0700
fixed missing __
---
gremlin-test/features/branch/Branch.feature | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gremlin-test/features/branch/Branch.feature b/gremlin-test/features/branch/Branch.feature
index 7bb3e04..69bb54c 100644
--- a/gremlin-test/features/branch/Branch.feature
+++ b/gremlin-test/features/branch/Branch.feature
@@ -96,7 +96,7 @@ Feature: Step - branch()
And the traversal of
"""
g.V().hasLabel("person").
- branch(values("age")).
+ branch(__.values("age")).
option(P.lt(30), __.constant("young")).
option(P.gt(30), __.constant("old")).
option(Pick.none, __.constant("on the edge"))