You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by ok...@apache.org on 2016/09/14 21:40:06 UTC

tinkerpop git commit: added two where()-by() examples to the reference documentation.

Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1330 5f264db45 -> be64b529f


added two where()-by() examples to the reference documentation.


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

Branch: refs/heads/TINKERPOP-1330
Commit: be64b529ff711e3d8cecf438d7015642858384e0
Parents: 5f264db
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Wed Sep 14 15:40:02 2016 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Wed Sep 14 15:40:02 2016 -0600

----------------------------------------------------------------------
 docs/src/reference/the-traversal.asciidoc | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/be64b529/docs/src/reference/the-traversal.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc
index 34e6b4d..64ce716 100644
--- a/docs/src/reference/the-traversal.asciidoc
+++ b/docs/src/reference/the-traversal.asciidoc
@@ -2190,6 +2190,18 @@ g.V().where(out('created').count().is(gte(2))).values('name') <3>
 g.V().where(out('knows').where(out('created'))).values('name') <4>
 g.V().where(__.not(out('created'))).where(__.in('knows')).values('name') <5>
 g.V().where(__.not(out('created')).and().in('knows')).values('name') <6>
+g.V().as('a').out('knows').as('b').
+  where('a',gt('b')).
+    by('age').
+  select('a','b').
+    by('name') <7>
+g.V().as('a').out('knows').as('b').
+  where('a',gt('b').or(eq('b'))).
+    by('age').
+    by('age').
+    by(__.in('knows').values('age')).
+  select('a','b').
+    by('name') <8>
 ----
 
 <1> What are the names of the people who have created a project?
@@ -2198,6 +2210,8 @@ g.V().where(__.not(out('created')).and().in('knows')).values('name') <6>
 <4> What are the names of the people who know someone that has created a project? (This only works in OLTP -- see the `WARNING` below)
 <5> What are the names of the people who have not created anything, but are known by someone?
 <6> The concatenation of `where()`-steps is the same as a single `where()`-step with an and'd clause.
+<7> Marko knows josh and vadas but is only older than vadas.
+<8> Marko is younger than josh, but josh knows someone equal in age to marko (which is marko).
 
 WARNING: The anonymous traversal of `where()` processes the current object "locally". In OLAP, where the atomic unit
 of computing is the the vertex and its local "star graph," it is important that the anonymous traversal does not leave