You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2016/02/17 13:24:50 UTC
incubator-tinkerpop git commit: Added a TIP about returning empty
list instead of null in gremlin console tutorial.
Repository: incubator-tinkerpop
Updated Branches:
refs/heads/tp31 888ac6a23 -> b0dfde366
Added a TIP about returning empty list instead of null in gremlin console tutorial.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/b0dfde36
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/b0dfde36
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/b0dfde36
Branch: refs/heads/tp31
Commit: b0dfde366cf57211d2596630dea870d87e93de59
Parents: 888ac6a
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Feb 17 07:24:08 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 17 07:24:08 2016 -0500
----------------------------------------------------------------------
docs/src/tutorials/the-gremlin-console/index.asciidoc | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/b0dfde36/docs/src/tutorials/the-gremlin-console/index.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/tutorials/the-gremlin-console/index.asciidoc b/docs/src/tutorials/the-gremlin-console/index.asciidoc
index 7b749fa..f477877 100644
--- a/docs/src/tutorials/the-gremlin-console/index.asciidoc
+++ b/docs/src/tutorials/the-gremlin-console/index.asciidoc
@@ -258,6 +258,8 @@ t = g.V(1).outE().group().by(label).by(inV());null
t.next()
----
+TIP: In addition to "returning null", you could also return an empty list as in: `t = g.V(1);[]'.
+
image:gremlin-console-ide.png[float=left,width=300] The first line assigns the `Traversal` to `t`, but the line itself
is actually two lines of code as denoted by the semi-colon. The line of execution actually returns `null`, which is
what the console actual auto-iterates. At that point you can work with `t` as you desire.