You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2025/08/21 18:29:05 UTC
(tinkerpop) 02/03: Merge branch '3.7-dev' into 3.8-dev
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit a1f16803c2ef03bb8c1af86bf7af658540a5596c
Merge: 3d7960dd08 a20f3861f7
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Thu Aug 21 14:26:42 2025 -0400
Merge branch '3.7-dev' into 3.8-dev
docs/src/dev/provider/gremlin-semantics.asciidoc | 73 ++++++++++++++++++++++
.../gremlin/structure/service/ServiceRegistry.java | 1 -
.../Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs | 4 ++
gremlin-go/driver/cucumber/gremlin.go | 4 ++
.../gremlin-javascript/test/cucumber/gremlin.js | 4 ++
gremlin-python/src/main/python/radish/gremlin.py | 4 ++
.../gremlin/test/features/branch/Repeat.feature | 46 +++++++++++++-
7 files changed, 134 insertions(+), 2 deletions(-)
diff --cc docs/src/dev/provider/gremlin-semantics.asciidoc
index fa3d9dbcae,399ab1d5b7..a4ba4c52b6
--- a/docs/src/dev/provider/gremlin-semantics.asciidoc
+++ b/docs/src/dev/provider/gremlin-semantics.asciidoc
@@@ -1962,43 -1380,79 +1962,116 @@@ applies to list types which means that
See: link:https://github.com/apache/tinkerpop/tree/x.y.z/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ProductStep.java[source],
link:https://tinkerpop.apache.org/docs/x.y.z/reference/#product-step[reference]
+[[project-step]]
+=== project()
+
+*Description:* Projects the current object in the stream into a `Map` that is keyed by the provided labels.
+
+*Syntax:* `project(String projectKey, String... otherProjectKeys)`
+
+[width="100%",options="header"]
+|=========================================================
+|Start Step |Mid Step |Modulated |Domain |Range
+|N |Y |`by()` |`any` |`Map<String, Object>`
+|=========================================================
+
+*Arguments:*
+
+* `projectKey` - The first key to use in the resulting map.
+* `otherProjectKeys` - Additional keys to use in the resulting map.
+
+*Modulation:*
+
+* `by()` - Determines how to transform the current object for each key in the resulting map. The number of `by()`
+modulations should match the number of keys provided.
+
+*Considerations:*
+
+The `project()` step is similar to `select()` but instead of retrieving historic traverser state, it modulates the
+current state of the traverser. Each key in the resulting map corresponds to a `by()` modulation in the order they are
+provided. If a `by()` modulation doesn't produce a value for a particular key (not productive), that key will be omitted
+from the resulting `Map`.
+
+*Exceptions*
+
+* If duplicate keys are provided, an `IllegalArgumentException` will be thrown.
+
+See: link:https://github.com/apache/tinkerpop/tree/x.y.z/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ProjectStep.java[source],
+link:https://tinkerpop.apache.org/docs/x.y.z/reference/#project-step[reference]
+
+ [[repeat-step]]
+ === repeat()
+
+ *Description:* Iteratively applies a traversal (the "loop body") to each incoming traverser until a stopping
+ condition is met. Optionally, it can emit traversers on each iteration according to an emit predicate. The
+ repeat step supports loop naming and a loop counter via `loops()`.
+
+ *Syntax:* `repeat(Traversal repeatTraversal)` | `repeat(String loopName, Traversal repeatTraversal)`
+
+ [width="100%",options="header"]
+ |=========================================================
+ |Start Step |Mid Step |Modulated |Domain |Range
+ |N |Y |`emit()`, `until()`, `times()` |`any` |`any`
+ |=========================================================
+
+ *Arguments:*
+
+ * `repeatTraversal` - The traversal that represents the loop body to apply on each iteration.
+ * `loopName` - Optional name used to identify the loop for nested loops and to access a specific counter via
+ `loops(loopName)`.
+
+ *Modulation:*
+
+ * `emit()` | `emit(Traversal<?, ?> emitTraversal)` | `emit(Predicate<Traverser<?>> emitPredicate)` - Controls if/when a
+ traverser is emitted to the downstream of repeat() in addition to being looped again. If supplied before `repeat(...)`
+ the predicate is evaluated prior to the first iteration (pre-emit). If supplied after `repeat(...)`, the predicate is
+ evaluated after each completed iteration (post-emit). Calling `emit()` without arguments is equivalent to a predicate
+ that always evaluates to true at the given check position.
+ * `until(Traversal<?, ?> untilTraversal)` | `until(Predicate<Traverser<?>> untilPredicate)` - Controls when repetition
+ stops. If supplied before `repeat(...)` the predicate is evaluated prior to the first iteration (pre-check). If the
+ predicate is true, the traverser will pass downstream without any loop iteration. If supplied after `repeat(...)`, the
+ predicate is evaluated after each completed iteration (post-check). When the predicate is true, the traverser stops
+ repeating and passes downstream.
+ * `times(int n)` - Convenience for a loop bound. Equivalent to `until(loops().is(n))` when placed after `repeat(...)`
+ (post-check), and equivalent to `until(loops().is(n))` placed before `repeat(...)` (pre-check) when specified before.
+ See Considerations for details and examples.
+
+ *Considerations:*
+
+ - Evaluation order matters. The placement of `emit()` and `until()` relative to `repeat()` controls whether their
+ predicates are evaluated before the first iteration (pre) or after each iteration (post) allowing for `while/do` or
+ `do/while` semantics respectively:
+ - Pre-check / pre-emit: when the modulator appears before `repeat(...)`.
+ - Post-check / post-emit: when the modulator appears after `repeat(...)`.
+ - Loop counter semantics:
+ - The loop counter for a given named or unnamed repeat is incremented once per completion of the loop body (i.e.,
+ after the body finishes), not before. Therefore, `loops()` reflects the number of completed iterations.
+ - `loops()` without arguments returns the counter for the closest (innermost) `repeat()`. `loops("name")` returns the
+ counter for the named loop.
+ - Re-queuing for the next iteration:
+ - After each iteration, if `until` is not satisfied at the post-check, the traverser is sent back into the loop body
+ for another iteration. If it is satisfied, the traverser exits the loop and proceeds downstream.
+ - Interaction of `times(n)`:
+ - `g.V().repeat(x).times(2)` applies `x` exactly twice; no values are emitted unless `emit()` is specified.
+ - `g.V().emit().repeat(x).times(2)` emits the original input (pre-emit) and then the results of each iteration.
+ - Placing `times(0)` before `repeat(...)` yields no iterations and passes the input downstream unchanged.
+ - Placing `times(0)` after `repeat(...)` yields the same as `times(1)` because of `do/while` semantics.
+ - Errors when `repeatTraversal` is missing:
+ - Using `emit()`, `until()`, or `times()` without an associated `repeat()` will raise an error at iteration time with a
+ message containing: `The repeat()-traversal was not defined`.
+ - Nested repeats and loop names:
+ - Nested `repeat()` steps maintain separate loop counters. Use `repeat("a", ...)` and `loops("a")` to reference a
+ specific counter inside nested loops.
+
+ *Exceptions*
+
+ * Using `emit()`, `until()`, or `times()` without a matching `repeat()` will raise an `IllegalStateException` at runtime
+ when the step is initialized during iteration with the message containing: `The repeat()-traversal was not defined`.
+
+ See: link:https://github.com/apache/tinkerpop/tree/x.y.z/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/RepeatStep.java[source],
+ link:https://tinkerpop.apache.org/docs/x.y.z/reference/#repeat-step[reference],
+ link:https://github.com/apache/tinkerpop/tree/x.y.z/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/branch/Repeat.feature[tests]
+
[[replace-step]]
=== replace()
diff --cc gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs
index 60db597a0a,289228fe00..964320d379
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs
@@@ -147,26 -119,28 +147,30 @@@ namespace Gremlin.Net.IntegrationTest.G
{"g_V_emit", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Emit()}},
{"g_V_untilXidentityX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Until(__.Identity())}},
{"g_V_timesX5X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Times(5)}},
- {"g_V_haxXperson_name_markoX_repeatXoutXcreatedXX_timesX1X_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Has("person","name","marko").Repeat(__.Out("created")).Times(1).Values<object>("name")}},
- {"g_V_haxXperson_name_markoX_repeatXoutXcreatedXX_timesX0X_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Has("person","name","marko").Repeat(__.Out("created")).Times(0).Values<object>("name")}},
- {"g_V_haxXperson_name_markoX_timesX1X_repeatXoutXcreatedXX_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Has("person","name","marko").Times(1).Repeat(__.Out("created")).Values<object>("name")}},
- {"g_V_haxXperson_name_markoX_timesX0X_repeatXoutXcreatedXX_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Has("person","name","marko").Times(0).Repeat(__.Out("created")).Values<object>("name")}},
++ {"g_V_haxXperson_name_markoX_repeatXoutXcreatedXX_timesX1X_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Has("person", "name", "marko").Repeat(__.Out("created")).Times(1).Values<object>("name")}},
++ {"g_V_haxXperson_name_markoX_repeatXoutXcreatedXX_timesX0X_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Has("person", "name", "marko").Repeat(__.Out("created")).Times(0).Values<object>("name")}},
++ {"g_V_haxXperson_name_markoX_timesX1X_repeatXoutXcreatedXX_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Has("person", "name", "marko").Times(1).Repeat(__.Out("created")).Values<object>("name")}},
++ {"g_V_haxXperson_name_markoX_timesX0X_repeatXoutXcreatedXX_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Has("person", "name", "marko").Times(0).Repeat(__.Out("created")).Values<object>("name")}},
{"g_unionXX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.Union<object>()}},
{"g_unionXV_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.Union<object>(__.V().Values<object>("name"))}},
- {"g_unionXVXv1X_VX4XX_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.Union<object>(__.V((Vertex) p["v1"]),__.V((Vertex) p["v4"])).Values<object>("name")}},
- {"g_unionXV_hasLabelXsoftwareX_V_hasLabelXpersonXX_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.Union<object>(__.V().HasLabel("software"),__.V().HasLabel("person")).Values<object>("name")}},
- {"g_unionXV_out_out_V_hasLabelXsoftwareXX_path", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.Union<object>(__.V().Out().Out(),__.V().HasLabel("software")).Path()}},
- {"g_unionXV_out_out_V_hasLabelXsoftwareXX_path_byXnameX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.Union<object>(__.V().Out().Out(),__.V().HasLabel("software")).Path().By("name")}},
- {"g_unionXunionXV_out_outX_V_hasLabelXsoftwareXX_path_byXnameX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.Union<object>(__.Union<object>(__.V().Out().Out()),__.V().HasLabel("software")).Path().By("name")}},
- {"g_unionXinjectX1X_injectX2X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.Union<object>(__.Inject(1),__.Inject(2))}},
- {"g_V_unionXconstantX1X_constantX2X_constantX3XX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V((Vertex) p["v2"]).Union<object>(__.Constant<object>(p["xx1"]),__.Constant<object>(p["xx2"]),__.Constant<object>(p["xx3"]))}},
- {"g_V_unionXout__inX_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Union<object>(__.Out(),__.In()).Values<object>("name")}},
- {"g_VX1X_unionXrepeatXoutX_timesX2X__outX_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V(p["vid1"]).Union<object>(__.Repeat(__.Out()).Times(2),__.Out()).Values<object>("name")}},
- {"g_V_chooseXlabel_is_person__unionX__out_lang__out_nameX__in_labelX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Choose<object>(__.Label().Is("person"),__.Union<object>(__.Out().Values<object>("lang"),__.Out().Values<object>("name")),__.In().Label())}},
- {"g_V_chooseXlabel_is_person__unionX__out_lang__out_nameX__in_labelX_groupCount", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Choose<object>(__.Label().Is("person"),__.Union<object>(__.Out().Values<object>("lang"),__.Out().Values<object>("name")),__.In().Label()).GroupCount<object>()}},
- {"g_V_unionXrepeatXunionXoutXcreatedX__inXcreatedXX_timesX2X__repeatXunionXinXcreatedX__outXcreatedXX_timesX2XX_label_groupCount", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Union<object>(__.Repeat(__.Union<object>(__.Out("created"),__.In("created"))).Times(2),__.Repeat(__.Union<object>(__.In("created"),__.Out("created"))).Times(2)).Label().GroupCount<object>()}},
- {"g_VX1_2X_unionXoutE_count__inE_count__outE_weight_sumX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V(p["vid1"],p["vid2"]).Union<object>(__.OutE().Count(),__.InE().Count(),__.OutE().Values<object>("weight").Sum<object>())}},
- {"g_VX1_2X_localXunionXoutE_count__inE_count__outE_weight_sumXX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V(p["vid1"],p["vid2"]).Local<object>(__.Union<object>(__.OutE().Count(),__.InE().Count(),__.OutE().Values<object>("weight").Sum<object>()))}},
- {"g_VX1_2X_localXunionXcountXX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V(p["vid1"],p["vid2"]).Local<object>(__.Union<object>(__.Count()))}},
- {"g_unionXaddVXpersonX_propertyXname_aliceX_addVXpersonX_propertyXname_bobX_addVXpersonX_propertyXname_chrisX_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.Union<object>(__.AddV("person").Property("name","alice"),__.AddV("person").Property("name","bob"),__.AddV("person").Property("name","chris")).Values<object>("name")}},
+ {"g_unionXVXv1X_VX4XX_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.Union<object>(__.V(p["vid1"]), __.V(p["vid4"])).Values<object>("name")}},
+ {"g_unionXV_hasLabelXsoftwareX_V_hasLabelXpersonXX_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.Union<object>(__.V().HasLabel("software"), __.V().HasLabel("person")).Values<object>("name")}},
+ {"g_unionXV_out_out_V_hasLabelXsoftwareXX_path", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.Union<object>(__.V().Out().Out(), __.V().HasLabel("software")).Path()}},
+ {"g_unionXV_out_out_V_hasLabelXsoftwareXX_path_byXnameX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.Union<object>(__.V().Out().Out(), __.V().HasLabel("software")).Path().By("name")}},
+ {"g_unionXunionXV_out_outX_V_hasLabelXsoftwareXX_path_byXnameX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.Union<object>(__.Union<object>(__.V().Out().Out()), __.V().HasLabel("software")).Path().By("name")}},
+ {"g_unionXinjectX1X_injectX2X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.Union<object>(__.Inject(1), __.Inject(2))}},
+ {"g_V_unionXconstantX1X_constantX2X_constantX3XX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V(p["vid2"]).Union<object>(__.Constant<object>(1), __.Constant<object>(2), __.Constant<object>(3))}},
+ {"g_V_unionXout__inX_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Union<object>(__.Out(), __.In()).Values<object>("name")}},
+ {"g_VX1X_unionXrepeatXoutX_timesX2X__outX_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V(p["vid1"]).Union<object>(__.Repeat(__.Out()).Times(2), __.Out()).Values<object>("name")}},
+ {"g_V_chooseXlabel_is_person__unionX__out_lang__out_nameX__in_labelX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Choose<object>(__.Label().Is("person"), __.Union<object>(__.Out().Values<object>("lang"), __.Out().Values<object>("name")), __.In().Label())}},
+ {"g_V_chooseXlabel_is_person__unionX__out_lang__out_nameX__in_labelX_groupCount", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Choose<object>(__.Label().Is("person"), __.Union<object>(__.Out().Values<object>("lang"), __.Out().Values<object>("name")), __.In().Label()).GroupCount<object>()}},
+ {"g_V_unionXrepeatXunionXoutXcreatedX__inXcreatedXX_timesX2X__repeatXunionXinXcreatedX__outXcreatedXX_timesX2XX_label_groupCount", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Union<object>(__.Repeat(__.Union<object>(__.Out("created"), __.In("created"))).Times(2), __.Repeat(__.Union<object>(__.In("created"), __.Out("created"))).Times(2)).Label().GroupCount<object>()}},
+ {"g_VX1_2X_unionXoutE_count__inE_count__outE_weight_sumX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V(p["vid1"], p["vid2"]).Union<object>(__.OutE().Count(), __.InE().Count(), __.OutE().Values<object>("weight").Sum<object>())}},
+ {"g_VX1_2X_localXunionXoutE_count__inE_count__outE_weight_sumXX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V(p["vid1"], p["vid2"]).Local<object>(__.Union<object>(__.OutE().Count(), __.InE().Count(), __.OutE().Values<object>("weight").Sum<object>()))}},
+ {"g_VX1_2X_localXunionXcountXX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V(p["vid1"], p["vid2"]).Local<object>(__.Union<object>(__.Count()))}},
+ {"g_unionXaddVXpersonX_propertyXname_aliceX_addVXpersonX_propertyXname_bobX_addVXpersonX_propertyXname_chrisX_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.Union<object>(__.AddV("person").Property("name", "alice"), __.AddV("person").Property("name", "bob"), __.AddV("person").Property("name", "chris")).Values<object>("name")}},
+ {"g_V_aggregateXxX_byXnameX_byXageX_capXxX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Aggregate("x").By("name").By("age").Cap<object>("x")}},
+ {"g_V_aggregateXScope_local_xX_byXnameX_byXageX_capXxX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Aggregate(Scope.Local, "x").By("name").By("age").Cap<object>("x")}},
{"g_V_valuesXageX_allXgtX32XX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Values<object>("age").All(P.Gt(32))}},
{"g_V_valuesXageX_whereXisXP_gtX33XXX_fold_allXgtX33XX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Values<object>("age").Where(__.Is(P.Gt(33))).Fold().All(P.Gt(33))}},
{"g_V_valuesXageX_order_byXdescX_fold_allXgtX10XX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Values<object>("age").Order().By(Order.Desc).Fold().All(P.Gt(10))}},
diff --cc gremlin-go/driver/cucumber/gremlin.go
index 1a6715271e,1ce169f7f5..04a3f56f5d
--- a/gremlin-go/driver/cucumber/gremlin.go
+++ b/gremlin-go/driver/cucumber/gremlin.go
@@@ -117,9 -90,13 +117,13 @@@ var translationMap = map[string][]func(
"g_V_emit": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Emit()}},
"g_V_untilXidentityX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Until(gremlingo.T__.Identity())}},
"g_V_timesX5X": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Times(5)}},
+ "g_V_haxXperson_name_markoX_repeatXoutXcreatedXX_timesX1X_name": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Has("person", "name", "marko").Repeat(gremlingo.T__.Out("created")).Times(1).Values("name")}},
+ "g_V_haxXperson_name_markoX_repeatXoutXcreatedXX_timesX0X_name": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Has("person", "name", "marko").Repeat(gremlingo.T__.Out("created")).Times(0).Values("name")}},
+ "g_V_haxXperson_name_markoX_timesX1X_repeatXoutXcreatedXX_name": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Has("person", "name", "marko").Times(1).Repeat(gremlingo.T__.Out("created")).Values("name")}},
+ "g_V_haxXperson_name_markoX_timesX0X_repeatXoutXcreatedXX_name": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Has("person", "name", "marko").Times(0).Repeat(gremlingo.T__.Out("created")).Values("name")}},
"g_unionXX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.Union()}},
"g_unionXV_name": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.Union(gremlingo.T__.V().Values("name"))}},
- "g_unionXVXv1X_VX4XX_name": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.Union(gremlingo.T__.V(p["v1"]), gremlingo.T__.V(p["v4"])).Values("name")}},
+ "g_unionXVXv1X_VX4XX_name": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.Union(gremlingo.T__.V(p["vid1"]), gremlingo.T__.V(p["vid4"])).Values("name")}},
"g_unionXV_hasLabelXsoftwareX_V_hasLabelXpersonXX_name": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.Union(gremlingo.T__.V().HasLabel("software"), gremlingo.T__.V().HasLabel("person")).Values("name")}},
"g_unionXV_out_out_V_hasLabelXsoftwareXX_path": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.Union(gremlingo.T__.V().Out().Out(), gremlingo.T__.V().HasLabel("software")).Path()}},
"g_unionXV_out_out_V_hasLabelXsoftwareXX_path_byXnameX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.Union(gremlingo.T__.V().Out().Out(), gremlingo.T__.V().HasLabel("software")).Path().By("name")}},
diff --cc gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/gremlin.js
index 6de912a9fd,a15710cfb1..382ec4b61c
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/gremlin.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/gremlin.js
@@@ -147,26 -110,28 +147,30 @@@ const gremlins =
g_V_emit: [function({g}) { return g.V().emit() }],
g_V_untilXidentityX: [function({g}) { return g.V().until(__.identity()) }],
g_V_timesX5X: [function({g}) { return g.V().times(5) }],
- g_V_haxXperson_name_markoX_repeatXoutXcreatedXX_timesX1X_name: [function({g}) { return g.V().has("person","name","marko").repeat(__.out("created")).times(1).values("name") }],
- g_V_haxXperson_name_markoX_repeatXoutXcreatedXX_timesX0X_name: [function({g}) { return g.V().has("person","name","marko").repeat(__.out("created")).times(0).values("name") }],
- g_V_haxXperson_name_markoX_timesX1X_repeatXoutXcreatedXX_name: [function({g}) { return g.V().has("person","name","marko").times(1).repeat(__.out("created")).values("name") }],
- g_V_haxXperson_name_markoX_timesX0X_repeatXoutXcreatedXX_name: [function({g}) { return g.V().has("person","name","marko").times(0).repeat(__.out("created")).values("name") }],
++ g_V_haxXperson_name_markoX_repeatXoutXcreatedXX_timesX1X_name: [function({g}) { return g.V().has("person", "name", "marko").repeat(__.out("created")).times(1).values("name") }],
++ g_V_haxXperson_name_markoX_repeatXoutXcreatedXX_timesX0X_name: [function({g}) { return g.V().has("person", "name", "marko").repeat(__.out("created")).times(0).values("name") }],
++ g_V_haxXperson_name_markoX_timesX1X_repeatXoutXcreatedXX_name: [function({g}) { return g.V().has("person", "name", "marko").times(1).repeat(__.out("created")).values("name") }],
++ g_V_haxXperson_name_markoX_timesX0X_repeatXoutXcreatedXX_name: [function({g}) { return g.V().has("person", "name", "marko").times(0).repeat(__.out("created")).values("name") }],
g_unionXX: [function({g}) { return g.union() }],
g_unionXV_name: [function({g}) { return g.union(__.V().values("name")) }],
- g_unionXVXv1X_VX4XX_name: [function({g, v4, v1}) { return g.union(__.V(v1),__.V(v4)).values("name") }],
- g_unionXV_hasLabelXsoftwareX_V_hasLabelXpersonXX_name: [function({g}) { return g.union(__.V().hasLabel("software"),__.V().hasLabel("person")).values("name") }],
- g_unionXV_out_out_V_hasLabelXsoftwareXX_path: [function({g}) { return g.union(__.V().out().out(),__.V().hasLabel("software")).path() }],
- g_unionXV_out_out_V_hasLabelXsoftwareXX_path_byXnameX: [function({g}) { return g.union(__.V().out().out(),__.V().hasLabel("software")).path().by("name") }],
- g_unionXunionXV_out_outX_V_hasLabelXsoftwareXX_path_byXnameX: [function({g}) { return g.union(__.union(__.V().out().out()),__.V().hasLabel("software")).path().by("name") }],
- g_unionXinjectX1X_injectX2X: [function({g}) { return g.union(__.inject(1),__.inject(2)) }],
- g_V_unionXconstantX1X_constantX2X_constantX3XX: [function({g, xx1, xx3, xx2, v2}) { return g.V(v2).union(__.constant(xx1),__.constant(xx2),__.constant(xx3)) }],
- g_V_unionXout__inX_name: [function({g}) { return g.V().union(__.out(),__.in_()).values("name") }],
- g_VX1X_unionXrepeatXoutX_timesX2X__outX_name: [function({g, vid1}) { return g.V(vid1).union(__.repeat(__.out()).times(2),__.out()).values("name") }],
- g_V_chooseXlabel_is_person__unionX__out_lang__out_nameX__in_labelX: [function({g}) { return g.V().choose(__.label().is("person"),__.union(__.out().values("lang"),__.out().values("name")),__.in_().label()) }],
- g_V_chooseXlabel_is_person__unionX__out_lang__out_nameX__in_labelX_groupCount: [function({g}) { return g.V().choose(__.label().is("person"),__.union(__.out().values("lang"),__.out().values("name")),__.in_().label()).groupCount() }],
- g_V_unionXrepeatXunionXoutXcreatedX__inXcreatedXX_timesX2X__repeatXunionXinXcreatedX__outXcreatedXX_timesX2XX_label_groupCount: [function({g}) { return g.V().union(__.repeat(__.union(__.out("created"),__.in_("created"))).times(2),__.repeat(__.union(__.in_("created"),__.out("created"))).times(2)).label().groupCount() }],
- g_VX1_2X_unionXoutE_count__inE_count__outE_weight_sumX: [function({g, vid2, vid1}) { return g.V(vid1,vid2).union(__.outE().count(),__.inE().count(),__.outE().values("weight").sum()) }],
- g_VX1_2X_localXunionXoutE_count__inE_count__outE_weight_sumXX: [function({g, vid2, vid1}) { return g.V(vid1,vid2).local(__.union(__.outE().count(),__.inE().count(),__.outE().values("weight").sum())) }],
- g_VX1_2X_localXunionXcountXX: [function({g, vid2, vid1}) { return g.V(vid1,vid2).local(__.union(__.count())) }],
- g_unionXaddVXpersonX_propertyXname_aliceX_addVXpersonX_propertyXname_bobX_addVXpersonX_propertyXname_chrisX_name: [function({g}) { return g.union(__.addV("person").property("name","alice"),__.addV("person").property("name","bob"),__.addV("person").property("name","chris")).values("name") }],
+ g_unionXVXv1X_VX4XX_name: [function({g, vid4, vid1}) { return g.union(__.V(vid1), __.V(vid4)).values("name") }],
+ g_unionXV_hasLabelXsoftwareX_V_hasLabelXpersonXX_name: [function({g}) { return g.union(__.V().hasLabel("software"), __.V().hasLabel("person")).values("name") }],
+ g_unionXV_out_out_V_hasLabelXsoftwareXX_path: [function({g}) { return g.union(__.V().out().out(), __.V().hasLabel("software")).path() }],
+ g_unionXV_out_out_V_hasLabelXsoftwareXX_path_byXnameX: [function({g}) { return g.union(__.V().out().out(), __.V().hasLabel("software")).path().by("name") }],
+ g_unionXunionXV_out_outX_V_hasLabelXsoftwareXX_path_byXnameX: [function({g}) { return g.union(__.union(__.V().out().out()), __.V().hasLabel("software")).path().by("name") }],
+ g_unionXinjectX1X_injectX2X: [function({g}) { return g.union(__.inject(1), __.inject(2)) }],
+ g_V_unionXconstantX1X_constantX2X_constantX3XX: [function({g, vid2}) { return g.V(vid2).union(__.constant(1), __.constant(2), __.constant(3)) }],
+ g_V_unionXout__inX_name: [function({g}) { return g.V().union(__.out(), __.in_()).values("name") }],
+ g_VX1X_unionXrepeatXoutX_timesX2X__outX_name: [function({g, vid1}) { return g.V(vid1).union(__.repeat(__.out()).times(2), __.out()).values("name") }],
+ g_V_chooseXlabel_is_person__unionX__out_lang__out_nameX__in_labelX: [function({g}) { return g.V().choose(__.label().is("person"), __.union(__.out().values("lang"), __.out().values("name")), __.in_().label()) }],
+ g_V_chooseXlabel_is_person__unionX__out_lang__out_nameX__in_labelX_groupCount: [function({g}) { return g.V().choose(__.label().is("person"), __.union(__.out().values("lang"), __.out().values("name")), __.in_().label()).groupCount() }],
+ g_V_unionXrepeatXunionXoutXcreatedX__inXcreatedXX_timesX2X__repeatXunionXinXcreatedX__outXcreatedXX_timesX2XX_label_groupCount: [function({g}) { return g.V().union(__.repeat(__.union(__.out("created"), __.in_("created"))).times(2), __.repeat(__.union(__.in_("created"), __.out("created"))).times(2)).label().groupCount() }],
+ g_VX1_2X_unionXoutE_count__inE_count__outE_weight_sumX: [function({g, vid2, vid1}) { return g.V(vid1, vid2).union(__.outE().count(), __.inE().count(), __.outE().values("weight").sum()) }],
+ g_VX1_2X_localXunionXoutE_count__inE_count__outE_weight_sumXX: [function({g, vid2, vid1}) { return g.V(vid1, vid2).local(__.union(__.outE().count(), __.inE().count(), __.outE().values("weight").sum())) }],
+ g_VX1_2X_localXunionXcountXX: [function({g, vid2, vid1}) { return g.V(vid1, vid2).local(__.union(__.count())) }],
+ g_unionXaddVXpersonX_propertyXname_aliceX_addVXpersonX_propertyXname_bobX_addVXpersonX_propertyXname_chrisX_name: [function({g}) { return g.union(__.addV("person").property("name", "alice"), __.addV("person").property("name", "bob"), __.addV("person").property("name", "chris")).values("name") }],
+ g_V_aggregateXxX_byXnameX_byXageX_capXxX: [function({g}) { return g.V().aggregate("x").by("name").by("age").cap("x") }],
+ g_V_aggregateXScope_local_xX_byXnameX_byXageX_capXxX: [function({g}) { return g.V().aggregate(Scope.local, "x").by("name").by("age").cap("x") }],
g_V_valuesXageX_allXgtX32XX: [function({g}) { return g.V().values("age").all(P.gt(32)) }],
g_V_valuesXageX_whereXisXP_gtX33XXX_fold_allXgtX33XX: [function({g}) { return g.V().values("age").where(__.is(P.gt(33))).fold().all(P.gt(33)) }],
g_V_valuesXageX_order_byXdescX_fold_allXgtX10XX: [function({g}) { return g.V().values("age").order().by(Order.desc).fold().all(P.gt(10)) }],
diff --cc gremlin-python/src/main/python/radish/gremlin.py
index 0707a65b8d,9601ce5ee6..80a3621112
--- a/gremlin-python/src/main/python/radish/gremlin.py
+++ b/gremlin-python/src/main/python/radish/gremlin.py
@@@ -120,58 -92,60 +120,62 @@@ world.gremlins =
'g_V_emit': [(lambda g:g.V().emit())],
'g_V_untilXidentityX': [(lambda g:g.V().until(__.identity()))],
'g_V_timesX5X': [(lambda g:g.V().times(5))],
- 'g_V_haxXperson_name_markoX_repeatXoutXcreatedXX_timesX1X_name': [(lambda g:g.V().has('person','name','marko').repeat(__.out('created')).times(1).name)],
- 'g_V_haxXperson_name_markoX_repeatXoutXcreatedXX_timesX0X_name': [(lambda g:g.V().has('person','name','marko').repeat(__.out('created')).times(0).name)],
- 'g_V_haxXperson_name_markoX_timesX1X_repeatXoutXcreatedXX_name': [(lambda g:g.V().has('person','name','marko').times(1).repeat(__.out('created')).name)],
- 'g_V_haxXperson_name_markoX_timesX0X_repeatXoutXcreatedXX_name': [(lambda g:g.V().has('person','name','marko').times(0).repeat(__.out('created')).name)],
++ 'g_V_haxXperson_name_markoX_repeatXoutXcreatedXX_timesX1X_name': [(lambda g:g.V().has('person', 'name', 'marko').repeat(__.out('created')).times(1).values('name'))],
++ 'g_V_haxXperson_name_markoX_repeatXoutXcreatedXX_timesX0X_name': [(lambda g:g.V().has('person', 'name', 'marko').repeat(__.out('created')).times(0).values('name'))],
++ 'g_V_haxXperson_name_markoX_timesX1X_repeatXoutXcreatedXX_name': [(lambda g:g.V().has('person', 'name', 'marko').times(1).repeat(__.out('created')).values('name'))],
++ 'g_V_haxXperson_name_markoX_timesX0X_repeatXoutXcreatedXX_name': [(lambda g:g.V().has('person', 'name', 'marko').times(0).repeat(__.out('created')).values('name'))],
'g_unionXX': [(lambda g:g.union())],
- 'g_unionXV_name': [(lambda g:g.union(__.V().name))],
- 'g_unionXVXv1X_VX4XX_name': [(lambda g, v4=None,v1=None:g.union(__.V(v1),__.V(v4)).name)],
- 'g_unionXV_hasLabelXsoftwareX_V_hasLabelXpersonXX_name': [(lambda g:g.union(__.V().has_label('software'),__.V().has_label('person')).name)],
- 'g_unionXV_out_out_V_hasLabelXsoftwareXX_path': [(lambda g:g.union(__.V().out().out(),__.V().has_label('software')).path())],
- 'g_unionXV_out_out_V_hasLabelXsoftwareXX_path_byXnameX': [(lambda g:g.union(__.V().out().out(),__.V().has_label('software')).path().by('name'))],
- 'g_unionXunionXV_out_outX_V_hasLabelXsoftwareXX_path_byXnameX': [(lambda g:g.union(__.union(__.V().out().out()),__.V().has_label('software')).path().by('name'))],
- 'g_unionXinjectX1X_injectX2X': [(lambda g:g.union(__.inject(1),__.inject(2)))],
- 'g_V_unionXconstantX1X_constantX2X_constantX3XX': [(lambda g, xx1=None,xx3=None,xx2=None,v2=None:g.V(v2).union(__.constant(xx1),__.constant(xx2),__.constant(xx3)))],
- 'g_V_unionXout__inX_name': [(lambda g:g.V().union(__.out(),__.in_()).name)],
- 'g_VX1X_unionXrepeatXoutX_timesX2X__outX_name': [(lambda g, vid1=None:g.V(vid1).union(__.repeat(__.out()).times(2),__.out()).name)],
- 'g_V_chooseXlabel_is_person__unionX__out_lang__out_nameX__in_labelX': [(lambda g:g.V().choose(__.label().is_('person'),__.union(__.out().lang,__.out().name),__.in_().label()))],
- 'g_V_chooseXlabel_is_person__unionX__out_lang__out_nameX__in_labelX_groupCount': [(lambda g:g.V().choose(__.label().is_('person'),__.union(__.out().lang,__.out().name),__.in_().label()).group_count())],
- 'g_V_unionXrepeatXunionXoutXcreatedX__inXcreatedXX_timesX2X__repeatXunionXinXcreatedX__outXcreatedXX_timesX2XX_label_groupCount': [(lambda g:g.V().union(__.repeat(__.union(__.out('created'),__.in_('created'))).times(2),__.repeat(__.union(__.in_('created'),__.out('created'))).times(2)).label().group_count())],
- 'g_VX1_2X_unionXoutE_count__inE_count__outE_weight_sumX': [(lambda g, vid2=None,vid1=None:g.V(vid1,vid2).union(__.out_e().count(),__.in_e().count(),__.out_e().weight.sum_()))],
- 'g_VX1_2X_localXunionXoutE_count__inE_count__outE_weight_sumXX': [(lambda g, vid2=None,vid1=None:g.V(vid1,vid2).local(__.union(__.out_e().count(),__.in_e().count(),__.out_e().weight.sum_())))],
- 'g_VX1_2X_localXunionXcountXX': [(lambda g, vid2=None,vid1=None:g.V(vid1,vid2).local(__.union(__.count())))],
- 'g_unionXaddVXpersonX_propertyXname_aliceX_addVXpersonX_propertyXname_bobX_addVXpersonX_propertyXname_chrisX_name': [(lambda g:g.union(__.add_v('person').property('name','alice'),__.add_v('person').property('name','bob'),__.add_v('person').property('name','chris')).name)],
- 'g_V_valuesXageX_allXgtX32XX': [(lambda g:g.V().age.all_(P.gt(32)))],
- 'g_V_valuesXageX_whereXisXP_gtX33XXX_fold_allXgtX33XX': [(lambda g:g.V().age.where(__.is_(P.gt(33))).fold().all_(P.gt(33)))],
- 'g_V_valuesXageX_order_byXdescX_fold_allXgtX10XX': [(lambda g:g.V().age.order().by(Order.desc).fold().all_(P.gt(10)))],
- 'g_V_valuesXageX_order_byXdescX_fold_allXgtX30XX': [(lambda g:g.V().age.order().by(Order.desc).fold().all_(P.gt(30)))],
- 'g_injectXabc_bcdX_allXeqXbcdXX': [(lambda g:g.inject(['abc','bcd']).all_(P.eq('bcd')))],
- 'g_injectXbcd_bcdX_allXeqXbcdXX': [(lambda g, xx1=None:g.inject(xx1).all_(P.eq('bcd')))],
- 'g_injectXnull_abcX_allXTextP_startingWithXaXX': [(lambda g, xx1=None:g.inject(xx1).all_(TextP.startingWith('a')))],
- 'g_injectX5_8_10_10_7X_allXgteX7XX': [(lambda g, xx1=None,xx2=None:g.inject(xx1,xx2).all_(P.gte(7)))],
+ 'g_unionXV_name': [(lambda g:g.union(__.V().values('name')))],
+ 'g_unionXVXv1X_VX4XX_name': [(lambda g, vid4=None,vid1=None:g.union(__.V(vid1), __.V(vid4)).values('name'))],
+ 'g_unionXV_hasLabelXsoftwareX_V_hasLabelXpersonXX_name': [(lambda g:g.union(__.V().has_label('software'), __.V().has_label('person')).values('name'))],
+ 'g_unionXV_out_out_V_hasLabelXsoftwareXX_path': [(lambda g:g.union(__.V().out().out(), __.V().has_label('software')).path())],
+ 'g_unionXV_out_out_V_hasLabelXsoftwareXX_path_byXnameX': [(lambda g:g.union(__.V().out().out(), __.V().has_label('software')).path().by('name'))],
+ 'g_unionXunionXV_out_outX_V_hasLabelXsoftwareXX_path_byXnameX': [(lambda g:g.union(__.union(__.V().out().out()), __.V().has_label('software')).path().by('name'))],
+ 'g_unionXinjectX1X_injectX2X': [(lambda g:g.union(__.inject(1), __.inject(2)))],
+ 'g_V_unionXconstantX1X_constantX2X_constantX3XX': [(lambda g, vid2=None:g.V(vid2).union(__.constant(1), __.constant(2), __.constant(3)))],
+ 'g_V_unionXout__inX_name': [(lambda g:g.V().union(__.out(), __.in_()).values('name'))],
+ 'g_VX1X_unionXrepeatXoutX_timesX2X__outX_name': [(lambda g, vid1=None:g.V(vid1).union(__.repeat(__.out()).times(2), __.out()).values('name'))],
+ 'g_V_chooseXlabel_is_person__unionX__out_lang__out_nameX__in_labelX': [(lambda g:g.V().choose(__.label().is_('person'), __.union(__.out().values('lang'), __.out().values('name')), __.in_().label()))],
+ 'g_V_chooseXlabel_is_person__unionX__out_lang__out_nameX__in_labelX_groupCount': [(lambda g:g.V().choose(__.label().is_('person'), __.union(__.out().values('lang'), __.out().values('name')), __.in_().label()).group_count())],
+ 'g_V_unionXrepeatXunionXoutXcreatedX__inXcreatedXX_timesX2X__repeatXunionXinXcreatedX__outXcreatedXX_timesX2XX_label_groupCount': [(lambda g:g.V().union(__.repeat(__.union(__.out('created'), __.in_('created'))).times(2), __.repeat(__.union(__.in_('created'), __.out('created'))).times(2)).label().group_count())],
+ 'g_VX1_2X_unionXoutE_count__inE_count__outE_weight_sumX': [(lambda g, vid2=None,vid1=None:g.V(vid1, vid2).union(__.out_e().count(), __.in_e().count(), __.out_e().values('weight').sum_()))],
+ 'g_VX1_2X_localXunionXoutE_count__inE_count__outE_weight_sumXX': [(lambda g, vid2=None,vid1=None:g.V(vid1, vid2).local(__.union(__.out_e().count(), __.in_e().count(), __.out_e().values('weight').sum_())))],
+ 'g_VX1_2X_localXunionXcountXX': [(lambda g, vid2=None,vid1=None:g.V(vid1, vid2).local(__.union(__.count())))],
+ 'g_unionXaddVXpersonX_propertyXname_aliceX_addVXpersonX_propertyXname_bobX_addVXpersonX_propertyXname_chrisX_name': [(lambda g:g.union(__.add_v('person').property('name', 'alice'), __.add_v('person').property('name', 'bob'), __.add_v('person').property('name', 'chris')).values('name'))],
+ 'g_V_aggregateXxX_byXnameX_byXageX_capXxX': [(lambda g:g.V().aggregate('x').by('name').by('age').cap('x'))],
+ 'g_V_aggregateXScope_local_xX_byXnameX_byXageX_capXxX': [(lambda g:g.V().aggregate(Scope.local, 'x').by('name').by('age').cap('x'))],
+ 'g_V_valuesXageX_allXgtX32XX': [(lambda g:g.V().values('age').all_(P.gt(32)))],
+ 'g_V_valuesXageX_whereXisXP_gtX33XXX_fold_allXgtX33XX': [(lambda g:g.V().values('age').where(__.is_(P.gt(33))).fold().all_(P.gt(33)))],
+ 'g_V_valuesXageX_order_byXdescX_fold_allXgtX10XX': [(lambda g:g.V().values('age').order().by(Order.desc).fold().all_(P.gt(10)))],
+ 'g_V_valuesXageX_order_byXdescX_fold_allXgtX30XX': [(lambda g:g.V().values('age').order().by(Order.desc).fold().all_(P.gt(30)))],
+ 'g_injectXabc_bcdX_allXeqXbcdXX': [(lambda g:g.inject(['abc', 'bcd']).all_(P.eq('bcd')))],
+ 'g_injectXbcd_bcdX_allXeqXbcdXX': [(lambda g:g.inject(['bcd', 'bcd']).all_(P.eq('bcd')))],
+ 'g_injectXnull_abcX_allXTextP_startingWithXaXX': [(lambda g:g.inject([None, 'abc']).all_(TextP.starting_with('a')))],
+ 'g_injectX5_8_10_10_7X_allXgteX7XX': [(lambda g:g.inject([5, 8, 10], [10, 7]).all_(P.gte(7)))],
'g_injectXnullX_allXeqXnullXX': [(lambda g:g.inject(None).all_(P.eq(None)))],
'g_injectX7X_allXeqX7XX': [(lambda g:g.inject(7).all_(P.eq(7)))],
- 'g_injectXnull_nullX_allXeqXnullXX': [(lambda g, xx1=None:g.inject(xx1).all_(P.eq(None)))],
- 'g_injectX3_threeX_allXeqX3XX': [(lambda g, xx1=None:g.inject(xx1).all_(P.eq(3)))],
- 'g_V_andXhasXage_gt_27X__outE_count_gte_2X_name': [(lambda g:g.V().and_(__.has('age',P.gt(27)),__.out_e().count().is_(P.gte(2))).name)],
- 'g_V_andXoutE__hasXlabel_personX_and_hasXage_gte_32XX_name': [(lambda g:g.V().and_(__.out_e(),__.has(T.label,'person').and_().has('age',P.gte(32))).name)],
- 'g_V_asXaX_outXknowsX_and_outXcreatedX_inXcreatedX_asXaX_name': [(lambda g:g.V().as_('a').out('knows').and_().out('created').in_('created').as_('a').name)],
- 'g_V_asXaX_andXselectXaX_selectXaXX': [(lambda g:g.V().as_('a').and_(__.select('a'),__.select('a')))],
- 'g_V_hasXname_markoX_and_hasXname_markoX_and_hasXname_markoX': [(lambda g:g.V().has('name','marko').and_().has('name','marko').and_().has('name','marko'))],
- 'g_V_valuesXageX_anyXgtX32XX': [(lambda g:g.V().age.any_(P.gt(32)))],
- 'g_V_valuesXageX_order_byXdescX_fold_anyXeqX29XX': [(lambda g:g.V().age.order().by(Order.desc).fold().any_(P.eq(29)))],
- 'g_V_valuesXageX_order_byXdescX_fold_anyXgtX10XX': [(lambda g:g.V().age.order().by(Order.desc).fold().any_(P.gt(10)))],
- 'g_V_valuesXageX_order_byXdescX_fold_anyXgtX42XX': [(lambda g:g.V().age.order().by(Order.desc).fold().any_(P.gt(42)))],
- 'g_injectXabc_cdeX_anyXeqXbcdXX': [(lambda g:g.inject(['abc','cde']).any_(P.eq('bcd')))],
- 'g_injectXabc_bcdX_anyXeqXbcdXX': [(lambda g, xx1=None:g.inject(xx1).any_(P.eq('bcd')))],
- 'g_injectXnull_abcX_anyXTextP_startingWithXaXX': [(lambda g, xx1=None:g.inject(xx1).any_(TextP.startingWith('a')))],
- 'g_injectX5_8_10_10_7X_anyXeqX7XX': [(lambda g, xx1=None,xx2=None:g.inject(xx1,xx2).any_(P.eq(7)))],
+ 'g_injectXnull_nullX_allXeqXnullXX': [(lambda g:g.inject([None, None]).all_(P.eq(None)))],
+ 'g_injectX3_threeX_allXeqX3XX': [(lambda g:g.inject([3, 'three']).all_(P.eq(3)))],
+ 'g_V_andXhasXage_gt_27X__outE_count_gte_2X_name': [(lambda g:g.V().and_(__.has('age', P.gt(27)), __.out_e().count().is_(P.gte(2))).values('name'))],
+ 'g_V_andXoutE__hasXlabel_personX_and_hasXage_gte_32XX_name': [(lambda g:g.V().and_(__.out_e(), __.has(T.label, 'person').and_().has('age', P.gte(32))).values('name'))],
+ 'g_V_asXaX_outXknowsX_and_outXcreatedX_inXcreatedX_asXaX_name': [(lambda g:g.V().as_('a').out('knows').and_().out('created').in_('created').as_('a').values('name'))],
+ 'g_V_asXaX_andXselectXaX_selectXaXX': [(lambda g:g.V().as_('a').and_(__.select('a'), __.select('a')))],
+ 'g_V_hasXname_markoX_and_hasXname_markoX_and_hasXname_markoX': [(lambda g:g.V().has('name', 'marko').and_().has('name', 'marko').and_().has('name', 'marko'))],
+ 'g_V_valuesXageX_anyXgtX32XX': [(lambda g:g.V().values('age').any_(P.gt(32)))],
+ 'g_V_valuesXageX_order_byXdescX_fold_anyXeqX29XX': [(lambda g:g.V().values('age').order().by(Order.desc).fold().any_(P.eq(29)))],
+ 'g_V_valuesXageX_order_byXdescX_fold_anyXgtX10XX': [(lambda g:g.V().values('age').order().by(Order.desc).fold().any_(P.gt(10)))],
+ 'g_V_valuesXageX_order_byXdescX_fold_anyXgtX42XX': [(lambda g:g.V().values('age').order().by(Order.desc).fold().any_(P.gt(42)))],
+ 'g_injectXabc_cdeX_anyXeqXbcdXX': [(lambda g:g.inject(['abc', 'cde']).any_(P.eq('bcd')))],
+ 'g_injectXabc_bcdX_anyXeqXbcdXX': [(lambda g:g.inject(['abc', 'bcd']).any_(P.eq('bcd')))],
+ 'g_injectXnull_abcX_anyXTextP_startingWithXaXX': [(lambda g:g.inject([None, 'abc']).any_(TextP.starting_with('a')))],
+ 'g_injectX5_8_10_10_7X_anyXeqX7XX': [(lambda g:g.inject([5, 8, 10], [10, 7]).any_(P.eq(7)))],
'g_injectXnullX_anyXeqXnullXX': [(lambda g:g.inject(None).any_(P.eq(None)))],
'g_injectX7X_anyXeqX7XX': [(lambda g:g.inject(7).any_(P.eq(7)))],
- 'g_injectXnull_nullX_anyXeqXnullXX': [(lambda g, xx1=None:g.inject(xx1).any_(P.eq(None)))],
- 'g_injectX3_threeX_anyXeqX3XX': [(lambda g, xx1=None:g.inject(xx1).any_(P.eq(3)))],
- 'g_V_coinX1X': [(lambda g:g.V().coin(float(1.0)))],
- 'g_V_coinX0X': [(lambda g:g.V().coin(float(0.0)))],
- 'g_withStrategiesXSeedStrategyX_V_order_byXnameX_coinX50X': [(lambda g:g.with_strategies(*[TraversalStrategy('SeedStrategy',{'seed':999999,'strategy':'org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SeedStrategy'}, 'org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SeedStrategy')]).V().order().by('name').coin(float(0.5)))],
+ 'g_injectXnull_nullX_anyXeqXnullXX': [(lambda g:g.inject([None, None]).any_(P.eq(None)))],
+ 'g_injectX3_threeX_anyXeqX3XX': [(lambda g:g.inject([3, 'three']).any_(P.eq(3)))],
+ 'g_V_coinX1X': [(lambda g:g.V().coin(1.0))],
+ 'g_V_coinX0X': [(lambda g:g.V().coin(0.0))],
+ 'g_withStrategiesXSeedStrategyX_V_order_byXnameX_coinX50X': [(lambda g:g.with_strategies(SeedStrategy(seed=999999)).V().order().by('name').coin(0.5))],
'g_VX1X_outXcreatedX_inXcreatedX_cyclicPath': [(lambda g, vid1=None:g.V(vid1).out('created').in_('created').cyclic_path())],
'g_VX1X_both_both_cyclicPath_byXageX': [(lambda g, vid1=None:g.V(vid1).both().both().cyclic_path().by('age'))],
'g_VX1X_outXcreatedX_inXcreatedX_cyclicPath_path': [(lambda g, vid1=None:g.V(vid1).out('created').in_('created').cyclic_path().path())],