[tinkerpop] 01/01: TINKERPOP-2514 Prevent two request ids to be pending at same time
This is an automated email from the ASF dual-hosted git repository. spmallette pushed a commit to branch TINKERPOP-2514 in repository https://gitbox.apache.org/repos/asf/tinkerpop.git commit 8729fd4ce1711b29bc0b90670e87df33e91f4f09 Author: Stephen Mallette AuthorDate: Wed Feb 17 17:26:00 2021 -0500 TINKERPOP-2514 Prevent two request ids to be pending at same time --- CHANGELOG.asciidoc | 1 + .../tinkerpop/gremlin/driver/Connection.java | 4 .../gremlin/server/GremlinDriverIntegrateTest.java | 28 +++--- 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 06777b3..a2b9c47 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -23,6 +23,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima [[release-3-4-11]] === TinkerPop 3.4.11 (Release Date: NOT OFFICIALLY RELEASED YET) +* Prevented Java driver from sending multiple request messages with the same identifier. * Improved error message for `property(T,Object)` when mutating graph elements. * Added method caching for GraphSON 3.0 deserialization of `P` and `TextP` instances. * Fixed bug with Javascript Groovy `Translator` when generating Gremlin with multiple embedded traversals. diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Connection.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Connection.java index c3bc00d..897fedd 100644 --- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Connection.java +++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Connection.java @@ -220,6 +220,10 @@ final class Connection { } public ChannelPromise write(final RequestMessage requestMessage, final CompletableFuture resultQueueSetup) { +// dont allow the same request id to be used as one that is already in the queue +if (pending.containsKey(requestMessage.getRequestId())) +throw new IllegalStateException(String.format("There is already a request pending with an id of: %s", requestMessage.getRequestId())); + // once there is a completed write, then create a traverser for the result set and complete // the promise so that the client knows that that it can start checking for results. final Connection thisConnection = this; diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java index 2aefd2b..f256e51 100644 --- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java +++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java @@ -65,7 +65,6 @@ import org.slf4j.LoggerFactory; import java.awt.Color; import java.io.File; -import java.net.ConnectException; import java.time.Instant; import java.util.ArrayList; import java.util.Arrays; @@ -80,8 +79,8 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; +import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; import java.util.stream.Collectors; @@ -91,7 +90,6 @@ import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.CoreMatchers.endsWith; import static org.hamcrest.CoreMatchers.instanceOf; import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.collection.IsIterableContainingInOrder.contains; import static org.hamcrest.core.AllOf.allOf; import static org.hamcrest.number.OrderingComparison.greaterThan; import static org.hamcrest.number.OrderingComparison.lessThanOrEqualTo; @@ -1835,4 +1833,28 @@ public class GremlinDriverIntegrateTest extends AbstractGremlinServerIntegration assertTrue(cluster != null); cluster.close(); } + +@Test +public void shouldNotHangWhenSameRequestIdIsUsed() throws Exception { +final Cluster cluster = TestClientFactory.build().maxConnectionPoolSize(1).minConnectionPoolSize(1).create(); +final Client client = cluster.connect(); +final UUID requestId = UUID.randomUUID(); + +final Future result1 = client.submitAsync("Thread.sleep(2000);100", +RequestOptions.build().overrideRequestId(requestId).create()); + +// wait for some business to happen on the server +Thread.sleep(100); +try { +// re-use the id and fail +client.submit("1+1+97", RequestOptions.build().overrideRequestId(requestId).create()); +fail("Request should not have been sent due to
[tinkerpop] branch TINKERPOP-2514 created (now 8729fd4)
This is an automated email from the ASF dual-hosted git repository. spmallette pushed a change to branch TINKERPOP-2514 in repository https://gitbox.apache.org/repos/asf/tinkerpop.git. at 8729fd4 TINKERPOP-2514 Prevent two request ids to be pending at same time This branch includes the following new commits: new 8729fd4 TINKERPOP-2514 Prevent two request ids to be pending at same time The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[tinkerpop] branch 3.4-dev updated (1c1c48a -> e7f0669)
This is an automated email from the ASF dual-hosted git repository. spmallette pushed a change to branch 3.4-dev in repository https://gitbox.apache.org/repos/asf/tinkerpop.git. from 1c1c48a Added some docs around importing special types in python CTR add e7f0669 Improved error message No new revisions were added by this update. Summary of changes: CHANGELOG.asciidoc | 1 + .../traversal/step/sideEffect/AddPropertyStep.java | 8 - .../tinkergraph/structure/TinkerGraphTest.java | 35 +- 3 files changed, 42 insertions(+), 2 deletions(-)
[tinkerpop] branch master updated (1cb1d8b -> aee427c)
This is an automated email from the ASF dual-hosted git repository. spmallette pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/tinkerpop.git. from 1cb1d8b Merge branch '3.4-dev' new e7f0669 Improved error message new aee427c Merge branch '3.4-dev' The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: CHANGELOG.asciidoc | 1 + .../traversal/step/sideEffect/AddPropertyStep.java | 8 - .../tinkergraph/structure/TinkerGraphTest.java | 34 ++ 3 files changed, 42 insertions(+), 1 deletion(-)
[tinkerpop] 02/02: Merge branch '3.4-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 aee427c6239bb5c80f397768dc3d917861487ec0 Merge: 1cb1d8b e7f0669 Author: Stephen Mallette AuthorDate: Wed Feb 17 14:14:03 2021 -0500 Merge branch '3.4-dev' CHANGELOG.asciidoc | 1 + .../traversal/step/sideEffect/AddPropertyStep.java | 8 - .../tinkergraph/structure/TinkerGraphTest.java | 34 ++ 3 files changed, 42 insertions(+), 1 deletion(-) diff --cc tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphTest.java index baa84a6,329a648..442c779 --- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphTest.java +++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphTest.java @@@ -715,18 -713,39 +715,52 @@@ public class TinkerGraphTest } @Test + public void shouldProvideClearErrorWhenTryingToMutateT() { + final GraphTraversalSource g = TinkerGraph.open().traversal(); + g.addV("person").property(T.id, 100).iterate(); + + try { + g.V(100).property(T.label, "software").iterate(); + fail("Should have thrown an error"); + } catch (IllegalStateException ise) { + assertEquals("T.label is immutable on existing elements", ise.getMessage()); + } + + try { + g.V(100).property(T.id, 101).iterate(); + fail("Should have thrown an error"); + } catch (IllegalStateException ise) { + assertEquals("T.id is immutable on existing elements", ise.getMessage()); + } + + try { + g.V(100).property("name", "marko").property(T.label, "software").iterate(); + fail("Should have thrown an error"); + } catch (IllegalStateException ise) { + assertEquals("T.label is immutable on existing elements", ise.getMessage()); + } + + try { + g.V(100).property(T.id, 101).property("name", "marko").iterate(); + fail("Should have thrown an error"); + } catch (IllegalStateException ise) { + assertEquals("T.id is immutable on existing elements", ise.getMessage()); + } + } + ++@Test +public void shouldWorkWithoutIdentityStrategy() { +final Graph graph = TinkerFactory.createModern(); +final GraphTraversalSource g = traversal().withEmbedded(graph).withoutStrategies(IdentityRemovalStrategy.class); +final List> result = g.V().match(__.as("a").out("knows").values("name").as("b")).identity().toList(); +assertEquals(2, result.size()); +result.stream().forEach(m -> { +assertEquals(2, m.size()); +assertThat(m.containsKey("a"), is(true)); +assertThat(m.containsKey("b"), is(true)); +}); +} + /** * Coerces a {@code Color} to a {@link TinkerGraph} during serialization. Demonstrates how custom serializers * can be developed that can coerce one value to another during serialization.
[tinkerpop] 01/02: Improved error message
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 e7f0669f4acc2285659b569df2775511ff1838fd Author: Stephen Mallette AuthorDate: Wed Feb 17 13:49:15 2021 -0500 Improved error message Can't mutate graph elements T values CTR --- CHANGELOG.asciidoc | 1 + .../traversal/step/sideEffect/AddPropertyStep.java | 8 - .../tinkergraph/structure/TinkerGraphTest.java | 35 +- 3 files changed, 42 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 61f293b..06777b3 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -23,6 +23,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima [[release-3-4-11]] === TinkerPop 3.4.11 (Release Date: NOT OFFICIALLY RELEASED YET) +* Improved error message for `property(T,Object)` when mutating graph elements. * Added method caching for GraphSON 3.0 deserialization of `P` and `TextP` instances. * Fixed bug with Javascript Groovy `Translator` when generating Gremlin with multiple embedded traversals. * Modified Gremlin Server `Settings` to be more extensible allowing for custom options with the YAML parser. diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/AddPropertyStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/AddPropertyStep.java index 0056507..cee4346 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/AddPropertyStep.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/AddPropertyStep.java @@ -82,9 +82,15 @@ public class AddPropertyStep extends SideEffectStep @Override protected void sideEffect(final Traverser.Admin traverser) { -final String key = (String) this.parameters.get(traverser, T.key, () -> { +final Object k = this.parameters.get(traverser, T.key, () -> { throw new IllegalStateException("The AddPropertyStep does not have a provided key: " + this); }).get(0); + +// T identifies immutable components of elements. only property keys can be modified. +if (k instanceof T) +throw new IllegalStateException(String.format("T.%s is immutable on existing elements", ((T) k).name())); + +final String key = (String) k; final Object value = this.parameters.get(traverser, T.value, () -> { throw new IllegalStateException("The AddPropertyStep does not have a provided value: " + this); }).get(0); diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphTest.java index a2208f5..329a648 100644 --- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphTest.java +++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphTest.java @@ -27,7 +27,6 @@ import org.apache.tinkerpop.gremlin.process.traversal.P; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__; import org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.ReservedKeysVerificationStrategy; -import org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.VerificationException; import org.apache.tinkerpop.gremlin.process.traversal.util.Metrics; import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalMetrics; import org.apache.tinkerpop.gremlin.structure.Edge; @@ -713,6 +712,40 @@ public class TinkerGraphTest { } } +@Test +public void shouldProvideClearErrorWhenTryingToMutateT() { +final GraphTraversalSource g = TinkerGraph.open().traversal(); +g.addV("person").property(T.id, 100).iterate(); + +try { +g.V(100).property(T.label, "software").iterate(); +fail("Should have thrown an error"); +} catch (IllegalStateException ise) { +assertEquals("T.label is immutable on existing elements", ise.getMessage()); +} + +try { +g.V(100).property(T.id, 101).iterate(); +fail("Should have thrown an error"); +} catch (IllegalStateException ise) { +assertEquals("T.id is immutable on existing elements", ise.getMessage()); +} + +try { +g.V(100).property("name", "marko").property(T.label, "software").iterate(); +fail("Should have thrown an error"); +} catch (IllegalStateException ise) { +assertEquals("T.label is immutable on existing
[tinkerpop] branch 3.4-dev updated (959c9a3 -> 1c1c48a)
This is an automated email from the ASF dual-hosted git repository. spmallette pushed a change to branch 3.4-dev in repository https://gitbox.apache.org/repos/asf/tinkerpop.git. from 959c9a3 Updated changelog add 1c1c48a Added some docs around importing special types in python CTR No new revisions were added by this update. Summary of changes: docs/src/reference/gremlin-variants.asciidoc | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-)
[tinkerpop] 02/02: Merge branch '3.4-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 1cb1d8b706b31c7fc04d99a63c1661dcbad05523 Merge: cf30afb 1c1c48a Author: Stephen Mallette AuthorDate: Wed Feb 17 12:24:04 2021 -0500 Merge branch '3.4-dev' docs/src/reference/gremlin-variants.asciidoc | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --cc docs/src/reference/gremlin-variants.asciidoc index a3f70fa,ee2e530..06c7306 --- a/docs/src/reference/gremlin-variants.asciidoc +++ b/docs/src/reference/gremlin-variants.asciidoc @@@ -782,21 -752,32 +782,34 @@@ Moreover, by importing the `statics` o With statics loaded its possible to represent the above traversal as below. -[gremlin-python,modern] +[source,python] -g.V().hasLabel('person').has('age',gt(30)).order().by('age',desc).toList() +>>> g.V().hasLabel('person').has('age',gt(30)).order().by('age',desc).toList() +[v[6], v[4]] - Finally, statics includes all the `+__+`-methods and thus, anonymous traversals like `+__.out()+` can be expressed as below. + Statics includes all the `+__+`-methods and thus, anonymous traversals like `+__.out()+` can be expressed as below. That is, without the `+__+`-prefix. -[gremlin-python,modern] +[source,python] -g.V().repeat(out()).times(2).name.fold().toList() +>>> g.V().repeat(out()).times(2).name.fold().toList() +[['ripple', 'lop']] + There may be situations where certain graphs may want a more exact data type than what Python will allow as a language. + To support these situations `gremlin-python` has a few special type classes that can be imported from `statics`. They + include: + + [source,python] + + from gremlin_python.statics import long # Java long + from gremlin_python.statics import timestamp# Java timestamp + from gremlin_python.statics import SingleByte # Java byte type + from gremlin_python.statics import SingleChar # Java char type + from gremlin_python.statics import GremlinType # Java Class + + anchor:python-configuration[] [[gremlin-python-configuration]] === Configuration
[tinkerpop] 01/02: Added some docs around importing special types in python CTR
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 1c1c48afd89b5d8aaadd4430ab5a748a3632bca7 Author: Stephen Mallette AuthorDate: Wed Feb 17 12:23:46 2021 -0500 Added some docs around importing special types in python CTR --- docs/src/reference/gremlin-variants.asciidoc | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/src/reference/gremlin-variants.asciidoc b/docs/src/reference/gremlin-variants.asciidoc index b4b39c1..ee2e530 100644 --- a/docs/src/reference/gremlin-variants.asciidoc +++ b/docs/src/reference/gremlin-variants.asciidoc @@ -757,7 +757,7 @@ With statics loaded its possible to represent the above traversal as below. g.V().hasLabel('person').has('age',gt(30)).order().by('age',desc).toList() -Finally, statics includes all the `+__+`-methods and thus, anonymous traversals like `+__.out()+` can be expressed as below. +Statics includes all the `+__+`-methods and thus, anonymous traversals like `+__.out()+` can be expressed as below. That is, without the `+__+`-prefix. [gremlin-python,modern] @@ -765,6 +765,19 @@ That is, without the `+__+`-prefix. g.V().repeat(out()).times(2).name.fold().toList() +There may be situations where certain graphs may want a more exact data type than what Python will allow as a language. +To support these situations `gremlin-python` has a few special type classes that can be imported from `statics`. They +include: + +[source,python] + +from gremlin_python.statics import long # Java long +from gremlin_python.statics import timestamp# Java timestamp +from gremlin_python.statics import SingleByte # Java byte type +from gremlin_python.statics import SingleChar # Java char type +from gremlin_python.statics import GremlinType # Java Class + + anchor:python-configuration[] [[gremlin-python-configuration]] === Configuration
[tinkerpop] branch master updated (cf30afb -> 1cb1d8b)
This is an automated email from the ASF dual-hosted git repository. spmallette pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/tinkerpop.git. from cf30afb Update tests CTR new 1c1c48a Added some docs around importing special types in python CTR new 1cb1d8b Merge branch '3.4-dev' The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: docs/src/reference/gremlin-variants.asciidoc | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-)
[tinkerpop] branch master updated: Update tests CTR
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 The following commit(s) were added to refs/heads/master by this push: new cf30afb Update tests CTR cf30afb is described below commit cf30afbeaa6b0d3fee2d30594b7c95c5ae7fa12f Author: Stephen Mallette AuthorDate: Wed Feb 17 07:38:45 2021 -0500 Update tests CTR --- gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs | 1 + .../src/main/javascript/gremlin-javascript/test/cucumber/gremlin.js | 1 + gremlin-python/src/main/python/radish/gremlin.py | 1 + 3 files changed, 3 insertions(+) diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs index 78fed81..f92426e 100644 --- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs +++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs @@ -650,6 +650,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation {"g_V_outXcreatedX_groupCountXxX_capXxX", new List, ITraversal>> {(g,p) =>g.V().Out("created").GroupCount("x").Cap("x")}}, {"g_V_groupCount_byXbothE_countX", new List, ITraversal>> {(g,p) =>g.V().GroupCount().By(__.BothE().Count())}}, {"g_V_both_groupCountXaX_out_capXaX_selectXkeysX_unfold_both_groupCountXaX_capXaX", new List, ITraversal>> {(g,p) =>g.V().Both().GroupCount("a").Out().Cap("a").Select(Column.Keys).Unfold().Both().GroupCount("a").Cap("a")}}, + {"g_V_hasXperson_name_markoX_bothXknowsX_groupCount_byXvaluesXnameX_foldX", new List, ITraversal>> {(g,p) =>g.V().Has("person","name","marko").Both("knows").GroupCount().By(__.Values("name").Fold())}}, {"g_VX1X_out_injectXv2X_name", new List, ITraversal>> {(g,p) =>g.V(p["vid1"]).Out().Inject((Vertex) p["v2"]).Values("name")}}, {"g_VX1X_out_name_injectXdanielX_asXaX_mapXlengthX_path", new List, ITraversal>> {(g,p) =>g.V(p["vid1"]).Out().Values("name").Inject("daniel").As("a").Map((IFunction) p["l1"]).Path()}}, {"g_VX1X_injectXg_VX4XX_out_name", new List, ITraversal>> {(g,p) =>g.V(p["vid1"]).Inject((Vertex) p["v4"]).Out().Values("name")}}, diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/gremlin.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/gremlin.js index 4d85c9c..62b322a 100644 --- a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/gremlin.js +++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/gremlin.js @@ -654,6 +654,7 @@ const gremlins = { g_V_outXcreatedX_groupCountXxX_capXxX: [function({g}) { return g.V().out("created").groupCount("x").cap("x") }], g_V_groupCount_byXbothE_countX: [function({g}) { return g.V().groupCount().by(__.bothE().count()) }], g_V_both_groupCountXaX_out_capXaX_selectXkeysX_unfold_both_groupCountXaX_capXaX: [function({g}) { return g.V().both().groupCount("a").out().cap("a").select(Column.keys).unfold().both().groupCount("a").cap("a") }], +g_V_hasXperson_name_markoX_bothXknowsX_groupCount_byXvaluesXnameX_foldX: [function({g}) { return g.V().has("person","name","marko").both("knows").groupCount().by(__.values("name").fold()) }], g_VX1X_out_injectXv2X_name: [function({g, vid1, v2}) { return g.V(vid1).out().inject(v2).values("name") }], g_VX1X_out_name_injectXdanielX_asXaX_mapXlengthX_path: [function({g, l1, vid1}) { return g.V(vid1).out().values("name").inject("daniel").as("a").map(l1).path() }], g_VX1X_injectXg_VX4XX_out_name: [function({g, vid1, v4}) { return g.V(vid1).inject(v4).out().values("name") }], diff --git a/gremlin-python/src/main/python/radish/gremlin.py b/gremlin-python/src/main/python/radish/gremlin.py index 75286e0..a4f8192 100644 --- a/gremlin-python/src/main/python/radish/gremlin.py +++ b/gremlin-python/src/main/python/radish/gremlin.py @@ -639,6 +639,7 @@ world.gremlins = { 'g_V_outXcreatedX_groupCountXxX_capXxX': [(lambda g:g.V().out('created').groupCount('x').cap('x'))], 'g_V_groupCount_byXbothE_countX': [(lambda g:g.V().groupCount().by(__.bothE().count()))], 'g_V_both_groupCountXaX_out_capXaX_selectXkeysX_unfold_both_groupCountXaX_capXaX': [(lambda g:g.V().both().groupCount('a').out().cap('a').select(Column.keys).unfold().both().groupCount('a').cap('a'))], +'g_V_hasXperson_name_markoX_bothXknowsX_groupCount_byXvaluesXnameX_foldX': [(lambda g:g.V().has('person','name','marko').both('knows').groupCount().by(__.name.fold()))], 'g_VX1X_out_injectXv2X_name': [(lambda g, vid1=None,v2=None:g.V(vid1).out().inject(v2).name)], 'g_VX1X_out_name_injectXdanielX_asXaX_mapXlengthX_path': [(lambda g, l1=None,vid1=None:g.V(vid1).out().name.inject('da