Skip to content

Commit b86ae26

Browse files
committed
Merge branch '3.8-dev'
2 parents 88b3d8e + 58b257d commit b86ae26

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
@@ -4855,6 +4855,22 @@ g.V().has('name','josh').out('created').values('name').
48554855
<1> When the `tree()` is created, vertex 3 and 5 are unique and thus, form unique branches in the tree structure.
48564856
<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.
48574857
4858+
The `tree()` step can also take a side-effect key as an argument. When using this form, the `Tree` is constructed
4859+
lazily, such that it becomes possible to assess its contents as each traverser passes through.
4860+
4861+
[gremlin-groovy,modern]
4862+
----
4863+
g.V().has('name','josh').out('created').values('name').tree('x').select('x')
4864+
----
4865+
4866+
You can use `cap()` step to force `tree()` to consume the traversal stream eagerly and output results similar to prior
4867+
examples.
4868+
4869+
[gremlin-groovy,modern]
4870+
----
4871+
g.V().has('name','josh').out('created').values('name').tree('x').cap('x')
4872+
----
4873+
48584874
*Additional References*
48594875
48604876
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)