Skip to content

Commit 58b257d

Browse files
committed
Merge branch '3.7-dev' into 3.8-dev
2 parents 67bac5a + 46af7f4 commit 58b257d

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

docs/src/reference/the-traversal.asciidoc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4843,6 +4843,22 @@ g.V().has('name','josh').out('created').values('name').
48434843
<1> When the `tree()` is created, vertex 3 and 5 are unique and thus, form unique branches in the tree structure.
48444844
<2> When the `tree()` is `by()`-modulated by `label`, then vertex 3 and 5 are both "software" and thus are merged to a single node in the tree.
48454845
4846+
The `tree()` step can also take a side-effect key as an argument. When using this form, the `Tree` is constructed
4847+
lazily, such that it becomes possible to assess its contents as each traverser passes through.
4848+
4849+
[gremlin-groovy,modern]
4850+
----
4851+
g.V().has('name','josh').out('created').values('name').tree('x').select('x')
4852+
----
4853+
4854+
You can use `cap()` step to force `tree()` to consume the traversal stream eagerly and output results similar to prior
4855+
examples.
4856+
4857+
[gremlin-groovy,modern]
4858+
----
4859+
g.V().has('name','josh').out('created').values('name').tree('x').cap('x')
4860+
----
4861+
48464862
*Additional References*
48474863
48484864
link:++https://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.html#tree()++[`tree()`],

0 commit comments

Comments
 (0)