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 2015/11/20 11:13:04 UTC

incubator-tinkerpop git commit: Added a paragraph to the tutorial about "iterating your traversal"

Repository: incubator-tinkerpop
Updated Branches:
  refs/heads/master 086a2585e -> d4de86bbb


Added a paragraph to the tutorial about "iterating your traversal"

Not sure how I forgot to write that important bit - CTR.


Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/d4de86bb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/d4de86bb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/d4de86bb

Branch: refs/heads/master
Commit: d4de86bbbbf41375c4a6705c020ec0ec61de49ad
Parents: 086a258
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Nov 20 05:11:55 2015 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Nov 20 05:11:55 2015 -0500

----------------------------------------------------------------------
 docs/src/tutorials-getting-started.asciidoc | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d4de86bb/docs/src/tutorials-getting-started.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/tutorials-getting-started.asciidoc b/docs/src/tutorials-getting-started.asciidoc
index 8560cb7..8787e57 100644
--- a/docs/src/tutorials-getting-started.asciidoc
+++ b/docs/src/tutorials-getting-started.asciidoc
@@ -135,6 +135,13 @@ g.V(1).out('knows').has('age', gt(30)).values('name')    <7>
 (similar to `inE().inV()` and `in` for incoming edges).
 <7> Get the names of the people vertex "1" knows who are over the age of 30.
 
+IMPORTANT: A `Traversal` is essentially an `Iterator` so if you have code like `x = g.V()`, the `x` does not contain
+the results of the `g.V()` query.  Rather, that statement assigns an `Iterator` value to `x`. To get your results,
+you would then need to iterate through `x`. This understanding is *important* because in the context of the console
+typing `g.V()` instantly returns a value. The console does some magic for you by noticing that `g.V()` returns
+an `Iterator` and then automatically iterates the results. In short, when writing Gremlin outside of the console
+always remember that you must iterate your `Traversal` manually in some way for it to do anything.
+
 In this first five minutes with Gremlin, you've gotten the Gremlin Console installed, instantiated a `Graph` and
 `TraversalSource`, wrote some traversals and hopefully learned something about TinkerPop in general. You've only
 scratched the surface of what there is to know, but those accomplishments will help enable your understanding of the