tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmalle...@apache.org
Subject [35/48] tinkerpop git commit: added two where()-by() examples to the reference documentation.
Date Fri, 16 Sep 2016 11:36:20 GMT
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/9ef30f0e
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/9ef30f0e
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/9ef30f0e

Branch: refs/heads/TINKERPOP-1442-master
Commit: 9ef30f0e2bc5153b3a76b571db9fc7c3aa151421
Parents: 68ecda4
Author: Marko A. Rodriguez <okrammarko@gmail.com>
Authored: Wed Sep 14 15:40:02 2016 -0600
Committer: Marko A. Rodriguez <okrammarko@gmail.com>
Committed: Thu Sep 15 09:58:53 2016 -0600

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


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9ef30f0e/docs/src/reference/the-traversal.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc
index f7064fd..e8d40e5 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 vertex and its local "star graph," it is important that the anonymous
traversal does not leave


Mime
View raw message