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 2017/07/05 14:54:59 UTC

[1/6] tinkerpop git commit: added A Note on Scopes to the-traversal docs.

Repository: tinkerpop
Updated Branches:
  refs/heads/master e4bf0271b -> c0d375cba


added A Note on Scopes to the-traversal docs.


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

Branch: refs/heads/master
Commit: 6579b017ee0d377d7428c1c182d8009a4153d859
Parents: c8cc0e5
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Fri Jun 30 12:33:07 2017 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Fri Jun 30 12:33:07 2017 -0600

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


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6579b017/docs/src/reference/the-traversal.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc
index f39fe11..8af40df 100644
--- a/docs/src/reference/the-traversal.asciidoc
+++ b/docs/src/reference/the-traversal.asciidoc
@@ -2574,6 +2574,49 @@ possible at the current, local vertex. What it can't compute without referencing
 into a barrier collection. When there are no more traversers at the local vertex, the barriered traversers are the
 messages that are propagated to remote vertices for further processing.
 
+[[a-note-on-scopes]]
+A Note on Scopes
+----------------
+
+The `Scope` enum has two constants: `Scope.local` and `Scope.global`. Scope determines whether the particular step
+being scoped is with respects to the current object (`local`) at that step or to the entire stream of objects up to that
+step ('global').
+
+[gremlin-groovy,modern]
+----
+g.V().has('name','marko').out('knows').count() <1>
+g.V().has('name','marko').out('knows').fold().count() <2>
+g.V().has('name','marko').out('knows').fold().count(local) <3>
+g.V().has('name','marko').out('knows').fold().count(global) <4>
+----
+
+<1> Marko knows 2 people.
+<2> A list of Marko's friends is created and thus, one object is counted (the single list).
+<3> A list of Marko's fiends is created and a `local`-count yields the number of objects in that list.
+<4> `count(global)` is the same as `count()` as the default behavior for most scoped steps is `global`.
+
+The steps that support scoping are:
+
+* <<count-step,`count()`>>: count the local collection or global stream.
+* <<dedup-step, `dedup()`>>: dedup the local collection of global stream.
+* <<max-step, `max()`>>: get the max value in the local collection or global stream.
+* <<mean-step, `mean()`>>: get the mean value in the local collection or global stream.
+* <<min-step, `min()`>>: get the min value in the local collection or global stream.
+* <<order-step,`order()`>>: order the objects in the local collection or global stream.
+* <<range-step, `range()`>>: clip the local collection or global stream.
+* <<sample-step, `sample()`>>: sample objects from the local collection or global stream.
+* <<tail-step, `tail()`>>: get the tail of the objects in the local collection or global stream.
+
+A few more examples of the use of `Scope` are provided below:
+
+[gremlin-groovy,modern]
+----
+g.V().both().group().by(label).select('software').dedup(local)
+g.V().groupCount().by(label).select(values).min(local)
+g.V().groupCount().by(label).order(local).by(values,decr)
+g.V().fold().sample(local,2)
+----
+
 [[a-note-on-lambdas]]
 A Note On Lambdas
 -----------------


[4/6] tinkerpop git commit: updated the docs with @dkuppitz recommended tweaks.

Posted by ok...@apache.org.
updated the docs with @dkuppitz recommended tweaks.


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

Branch: refs/heads/master
Commit: f6290331b9a393b9ddf1828c5850092806c86168
Parents: 41c16fa
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Wed Jul 5 07:31:08 2017 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Wed Jul 5 07:31:08 2017 -0600

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


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f6290331/docs/src/reference/the-traversal.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc
index 738255e..e7d9d25 100644
--- a/docs/src/reference/the-traversal.asciidoc
+++ b/docs/src/reference/the-traversal.asciidoc
@@ -2592,7 +2592,7 @@ g.V().has('name','marko').out('knows').fold().count(global) <4>
 
 <1> Marko knows 2 people.
 <2> A list of Marko's friends is created and thus, one object is counted (the single list).
-<3> A list of Marko's fiends is created and a `local`-count yields the number of objects in that list.
+<3> A list of Marko's friends is created and a `local`-count yields the number of objects in that list.
 <4> `count(global)` is the same as `count()` as the default behavior for most scoped steps is `global`.
 
 The steps that support scoping are:
@@ -2604,6 +2604,7 @@ The steps that support scoping are:
 * <<min-step, `min()`>>: get the min value in the local collection or global stream.
 * <<order-step,`order()`>>: order the objects in the local collection or global stream.
 * <<range-step, `range()`>>: clip the local collection or global stream.
+* <<limit-step, `limit()`>>: clip the local collection or global stream.
 * <<sample-step, `sample()`>>: sample objects from the local collection or global stream.
 * <<tail-step, `tail()`>>: get the tail of the objects in the local collection or global stream.
 


[2/6] tinkerpop git commit: added a note on local()-step as recommended by @jeromatron.

Posted by ok...@apache.org.
added a note on local()-step as recommended by @jeromatron.


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

Branch: refs/heads/master
Commit: fb90f881407d49ed6fc56ccfd20684837f418c98
Parents: 6579b01
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Fri Jun 30 12:54:22 2017 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Fri Jun 30 12:54:22 2017 -0600

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


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/fb90f881/docs/src/reference/the-traversal.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc
index 8af40df..3c52d5c 100644
--- a/docs/src/reference/the-traversal.asciidoc
+++ b/docs/src/reference/the-traversal.asciidoc
@@ -2617,6 +2617,15 @@ g.V().groupCount().by(label).order(local).by(values,decr)
 g.V().fold().sample(local,2)
 ----
 
+Finally, note that <<local-step,`local()`>>-step is a "hard-scoped step" that transforms any internal traversal into a
+locally-scoped operation. A contrived example is provided below:
+
+[gremlin-groovy,modern]
+----
+g.V().fold().local(unfold().count())
+g.V().fold().count(local)
+----
+
 [[a-note-on-lambdas]]
 A Note On Lambdas
 -----------------


[6/6] tinkerpop git commit: Merge branch 'tp32'

Posted by ok...@apache.org.
Merge branch 'tp32'


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

Branch: refs/heads/master
Commit: c0d375cba9c21d6ddcc4a8073738e0ad6e87a2ef
Parents: e4bf027 77d6dfd
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Wed Jul 5 08:54:50 2017 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Wed Jul 5 08:54:50 2017 -0600

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


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c0d375cb/docs/src/reference/the-traversal.asciidoc
----------------------------------------------------------------------


[3/6] tinkerpop git commit: fixed an apostrophe error noticed by @twilmes.

Posted by ok...@apache.org.
fixed an apostrophe error noticed by @twilmes.


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

Branch: refs/heads/master
Commit: 41c16fa72d372ac0b3f8b42375cab0f6a81ca5e5
Parents: fb90f88
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Fri Jun 30 14:33:02 2017 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Fri Jun 30 14:33:02 2017 -0600

----------------------------------------------------------------------
 docs/src/reference/the-traversal.asciidoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/41c16fa7/docs/src/reference/the-traversal.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc
index 3c52d5c..738255e 100644
--- a/docs/src/reference/the-traversal.asciidoc
+++ b/docs/src/reference/the-traversal.asciidoc
@@ -2580,7 +2580,7 @@ A Note on Scopes
 
 The `Scope` enum has two constants: `Scope.local` and `Scope.global`. Scope determines whether the particular step
 being scoped is with respects to the current object (`local`) at that step or to the entire stream of objects up to that
-step ('global').
+step (`global`).
 
 [gremlin-groovy,modern]
 ----


[5/6] tinkerpop git commit: Merge branch 'TINKERPOP-1708' into tp32

Posted by ok...@apache.org.
Merge branch 'TINKERPOP-1708' into tp32


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

Branch: refs/heads/master
Commit: 77d6dfdc34c296f7c337c583088a7c1fdc934280
Parents: 5f56495 f629033
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Wed Jul 5 08:54:39 2017 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Wed Jul 5 08:54:39 2017 -0600

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


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/77d6dfdc/docs/src/reference/the-traversal.asciidoc
----------------------------------------------------------------------