[tinkerpop] branch TINKERPOP-2420 updated: TINKERPOP-2420 Added docs for request options to all GLVs
This is an automated email from the ASF dual-hosted git repository. spmallette pushed a commit to branch TINKERPOP-2420 in repository https://gitbox.apache.org/repos/asf/tinkerpop.git The following commit(s) were added to refs/heads/TINKERPOP-2420 by this push: new ea2e63b TINKERPOP-2420 Added docs for request options to all GLVs ea2e63b is described below commit ea2e63b418784b5bb0ad5be6aa3a9dc00ef4 Author: Stephen Mallette AuthorDate: Mon Oct 5 20:09:47 2020 -0400 TINKERPOP-2420 Added docs for request options to all GLVs --- CHANGELOG.asciidoc | 2 +- docs/src/reference/gremlin-variants.asciidoc | 30 ++-- docs/src/upgrade/release-3.4.x.asciidoc| 32 ++ .../Docs/Reference/GremlinVariantsTests.cs | 18 4 files changed, 79 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index ef6c7a3..fe320c5 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -30,7 +30,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima * Removed `Connection` from `Connection Pool` when server closes a connection with no pending requests in Java Driver. * Improved initialization time of Java Driver if the default serializer is replaced. * Deprecated `withGraph()` in favor of `withEmbedded()` on `AnonymousTraversalSource`. -* Added support for per-request level configurations, like timeouts, in Python and Javascript. +* Added support for per-request level configurations, like timeouts, in .NET, Python and Javascript. * Fixed bug in Javascript `Translator` that wasn't handling child traversals well. * Implemented `AutoCloseable` on `MultiIterator`. * Fixed an iterator leak in `HasContainer`. diff --git a/docs/src/reference/gremlin-variants.asciidoc b/docs/src/reference/gremlin-variants.asciidoc index 70c084e..066f5d0 100644 --- a/docs/src/reference/gremlin-variants.asciidoc +++ b/docs/src/reference/gremlin-variants.asciidoc @@ -684,7 +684,7 @@ Some connection options can also be set on individual requests made through the [source,python] -vertices = g.with_('evaluationTimeout', 500L).V().out('knows').toList() +vertices = g.with_('evaluationTimeout', 500).V().out('knows').toList() The following options are allowed on a per-request basis in this fashion: `batchSize`, `requestId`, `userAgent` and @@ -1121,6 +1121,18 @@ the remote end. include::../../../gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Docs/Reference/GremlinVariantsTests.cs[tags=connecting] +Some connection options can also be set on individual requests made through the using `With()` step on the +`TraversalSource`. For instance to set request timeout to 500 milliseconds: + +[source,csharp] + +var l = g.With(Tokens.ArgsEvalTimeout, 500).V().Out("knows").Count(); + + +The following options are allowed on a per-request basis in this fashion: `batchSize`, `requestId`, `userAgent` and +`evaluationTimeout` (formerly 'scriptEvaluationTimeout' which is also supported but now deprecated). These options are +available as constants on the `Gremlin.Net.Driver.Tokens` class. + [[gremlin-dotnet-imports]] === Common Imports @@ -1246,6 +1258,20 @@ var gremlinServer = new GremlinServer("localhost", 8182); var client = new GremlinClient(gremlinServer, sessionId: Guid.NewGuid().ToString())) + Per Request Settings + +The `GremlinClient.submit()` functions accept an option to build a raw `RequestMessage`. A good use-case for this +feature is to set a per-request override to the `evaluationTimeout` so that it only applies to the current request. + +[source,csharp] + +include::../../../gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Docs/Reference/GremlinVariantsTests.cs[tags=submittingScriptsWithTimeout] + + +The following options are allowed on a per-request basis in this fashion: `batchSize`, `requestId`, `userAgent` and +`evaluationTimeout` (formerly 'scriptEvaluationTimeout' which is also supported but now deprecated). These options are +available as constants on the `Gremlin.Net.Driver.Tokens` class. + anchor:gremlin-net-dsl[] [[gremlin-dotnet-dsl]] === Domain Specific Languages @@ -1418,7 +1444,7 @@ Some connection options can also be set on individual requests made through the [source,javascript] -const vertices = await g.with_('evaluationTimeout', 500L).V().out('knows').toList() +const vertices = await g.with_('evaluationTimeout', 500).V().out('knows').toList() The following options are allowed on a per-request basis in this fashion: `batchSize`, `requestId`, `userAgent` and diff --git a/docs/src/upgrade/release-3.4.x.asciidoc b/docs/src/upgrade/release-3.4.x.asciidoc index a1bf501..40b2a68 100644 --- a/docs/src/upgrade/release-3.4.x.asciidoc +++ b/docs/src/upgrade/release-3.4.x.asciidoc @@ -70,6 +70,38 @@ const sg = g.withStrategies( See: link:https://issues.apache.org/jira/bro
[tinkerpop] branch TINKERPOP-2420 updated: TINKERPOP-2420 Added docs for request options to all GLVs
This is an automated email from the ASF dual-hosted git repository. spmallette pushed a commit to branch TINKERPOP-2420 in repository https://gitbox.apache.org/repos/asf/tinkerpop.git The following commit(s) were added to refs/heads/TINKERPOP-2420 by this push: new ea2e63b TINKERPOP-2420 Added docs for request options to all GLVs ea2e63b is described below commit ea2e63b418784b5bb0ad5be6aa3a9dc00ef4 Author: Stephen Mallette AuthorDate: Mon Oct 5 20:09:47 2020 -0400 TINKERPOP-2420 Added docs for request options to all GLVs --- CHANGELOG.asciidoc | 2 +- docs/src/reference/gremlin-variants.asciidoc | 30 ++-- docs/src/upgrade/release-3.4.x.asciidoc| 32 ++ .../Docs/Reference/GremlinVariantsTests.cs | 18 4 files changed, 79 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index ef6c7a3..fe320c5 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -30,7 +30,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima * Removed `Connection` from `Connection Pool` when server closes a connection with no pending requests in Java Driver. * Improved initialization time of Java Driver if the default serializer is replaced. * Deprecated `withGraph()` in favor of `withEmbedded()` on `AnonymousTraversalSource`. -* Added support for per-request level configurations, like timeouts, in Python and Javascript. +* Added support for per-request level configurations, like timeouts, in .NET, Python and Javascript. * Fixed bug in Javascript `Translator` that wasn't handling child traversals well. * Implemented `AutoCloseable` on `MultiIterator`. * Fixed an iterator leak in `HasContainer`. diff --git a/docs/src/reference/gremlin-variants.asciidoc b/docs/src/reference/gremlin-variants.asciidoc index 70c084e..066f5d0 100644 --- a/docs/src/reference/gremlin-variants.asciidoc +++ b/docs/src/reference/gremlin-variants.asciidoc @@ -684,7 +684,7 @@ Some connection options can also be set on individual requests made through the [source,python] -vertices = g.with_('evaluationTimeout', 500L).V().out('knows').toList() +vertices = g.with_('evaluationTimeout', 500).V().out('knows').toList() The following options are allowed on a per-request basis in this fashion: `batchSize`, `requestId`, `userAgent` and @@ -1121,6 +1121,18 @@ the remote end. include::../../../gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Docs/Reference/GremlinVariantsTests.cs[tags=connecting] +Some connection options can also be set on individual requests made through the using `With()` step on the +`TraversalSource`. For instance to set request timeout to 500 milliseconds: + +[source,csharp] + +var l = g.With(Tokens.ArgsEvalTimeout, 500).V().Out("knows").Count(); + + +The following options are allowed on a per-request basis in this fashion: `batchSize`, `requestId`, `userAgent` and +`evaluationTimeout` (formerly 'scriptEvaluationTimeout' which is also supported but now deprecated). These options are +available as constants on the `Gremlin.Net.Driver.Tokens` class. + [[gremlin-dotnet-imports]] === Common Imports @@ -1246,6 +1258,20 @@ var gremlinServer = new GremlinServer("localhost", 8182); var client = new GremlinClient(gremlinServer, sessionId: Guid.NewGuid().ToString())) + Per Request Settings + +The `GremlinClient.submit()` functions accept an option to build a raw `RequestMessage`. A good use-case for this +feature is to set a per-request override to the `evaluationTimeout` so that it only applies to the current request. + +[source,csharp] + +include::../../../gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Docs/Reference/GremlinVariantsTests.cs[tags=submittingScriptsWithTimeout] + + +The following options are allowed on a per-request basis in this fashion: `batchSize`, `requestId`, `userAgent` and +`evaluationTimeout` (formerly 'scriptEvaluationTimeout' which is also supported but now deprecated). These options are +available as constants on the `Gremlin.Net.Driver.Tokens` class. + anchor:gremlin-net-dsl[] [[gremlin-dotnet-dsl]] === Domain Specific Languages @@ -1418,7 +1444,7 @@ Some connection options can also be set on individual requests made through the [source,javascript] -const vertices = await g.with_('evaluationTimeout', 500L).V().out('knows').toList() +const vertices = await g.with_('evaluationTimeout', 500).V().out('knows').toList() The following options are allowed on a per-request basis in this fashion: `batchSize`, `requestId`, `userAgent` and diff --git a/docs/src/upgrade/release-3.4.x.asciidoc b/docs/src/upgrade/release-3.4.x.asciidoc index a1bf501..40b2a68 100644 --- a/docs/src/upgrade/release-3.4.x.asciidoc +++ b/docs/src/upgrade/release-3.4.x.asciidoc @@ -70,6 +70,38 @@ const sg = g.withStrategies( See: link:https://issues.apache.org/jira/bro
[tinkerpop] branch TINKERPOP-2420 updated: TINKERPOP-2420 Added docs for request options to all GLVs
This is an automated email from the ASF dual-hosted git repository. spmallette pushed a commit to branch TINKERPOP-2420 in repository https://gitbox.apache.org/repos/asf/tinkerpop.git The following commit(s) were added to refs/heads/TINKERPOP-2420 by this push: new ea2e63b TINKERPOP-2420 Added docs for request options to all GLVs ea2e63b is described below commit ea2e63b418784b5bb0ad5be6aa3a9dc00ef4 Author: Stephen Mallette AuthorDate: Mon Oct 5 20:09:47 2020 -0400 TINKERPOP-2420 Added docs for request options to all GLVs --- CHANGELOG.asciidoc | 2 +- docs/src/reference/gremlin-variants.asciidoc | 30 ++-- docs/src/upgrade/release-3.4.x.asciidoc| 32 ++ .../Docs/Reference/GremlinVariantsTests.cs | 18 4 files changed, 79 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index ef6c7a3..fe320c5 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -30,7 +30,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima * Removed `Connection` from `Connection Pool` when server closes a connection with no pending requests in Java Driver. * Improved initialization time of Java Driver if the default serializer is replaced. * Deprecated `withGraph()` in favor of `withEmbedded()` on `AnonymousTraversalSource`. -* Added support for per-request level configurations, like timeouts, in Python and Javascript. +* Added support for per-request level configurations, like timeouts, in .NET, Python and Javascript. * Fixed bug in Javascript `Translator` that wasn't handling child traversals well. * Implemented `AutoCloseable` on `MultiIterator`. * Fixed an iterator leak in `HasContainer`. diff --git a/docs/src/reference/gremlin-variants.asciidoc b/docs/src/reference/gremlin-variants.asciidoc index 70c084e..066f5d0 100644 --- a/docs/src/reference/gremlin-variants.asciidoc +++ b/docs/src/reference/gremlin-variants.asciidoc @@ -684,7 +684,7 @@ Some connection options can also be set on individual requests made through the [source,python] -vertices = g.with_('evaluationTimeout', 500L).V().out('knows').toList() +vertices = g.with_('evaluationTimeout', 500).V().out('knows').toList() The following options are allowed on a per-request basis in this fashion: `batchSize`, `requestId`, `userAgent` and @@ -1121,6 +1121,18 @@ the remote end. include::../../../gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Docs/Reference/GremlinVariantsTests.cs[tags=connecting] +Some connection options can also be set on individual requests made through the using `With()` step on the +`TraversalSource`. For instance to set request timeout to 500 milliseconds: + +[source,csharp] + +var l = g.With(Tokens.ArgsEvalTimeout, 500).V().Out("knows").Count(); + + +The following options are allowed on a per-request basis in this fashion: `batchSize`, `requestId`, `userAgent` and +`evaluationTimeout` (formerly 'scriptEvaluationTimeout' which is also supported but now deprecated). These options are +available as constants on the `Gremlin.Net.Driver.Tokens` class. + [[gremlin-dotnet-imports]] === Common Imports @@ -1246,6 +1258,20 @@ var gremlinServer = new GremlinServer("localhost", 8182); var client = new GremlinClient(gremlinServer, sessionId: Guid.NewGuid().ToString())) + Per Request Settings + +The `GremlinClient.submit()` functions accept an option to build a raw `RequestMessage`. A good use-case for this +feature is to set a per-request override to the `evaluationTimeout` so that it only applies to the current request. + +[source,csharp] + +include::../../../gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Docs/Reference/GremlinVariantsTests.cs[tags=submittingScriptsWithTimeout] + + +The following options are allowed on a per-request basis in this fashion: `batchSize`, `requestId`, `userAgent` and +`evaluationTimeout` (formerly 'scriptEvaluationTimeout' which is also supported but now deprecated). These options are +available as constants on the `Gremlin.Net.Driver.Tokens` class. + anchor:gremlin-net-dsl[] [[gremlin-dotnet-dsl]] === Domain Specific Languages @@ -1418,7 +1444,7 @@ Some connection options can also be set on individual requests made through the [source,javascript] -const vertices = await g.with_('evaluationTimeout', 500L).V().out('knows').toList() +const vertices = await g.with_('evaluationTimeout', 500).V().out('knows').toList() The following options are allowed on a per-request basis in this fashion: `batchSize`, `requestId`, `userAgent` and diff --git a/docs/src/upgrade/release-3.4.x.asciidoc b/docs/src/upgrade/release-3.4.x.asciidoc index a1bf501..40b2a68 100644 --- a/docs/src/upgrade/release-3.4.x.asciidoc +++ b/docs/src/upgrade/release-3.4.x.asciidoc @@ -70,6 +70,38 @@ const sg = g.withStrategies( See: link:https://issues.apache.org/jira/bro
[tinkerpop] branch TINKERPOP-2420 updated: TINKERPOP-2420 Added docs for request options to all GLVs
This is an automated email from the ASF dual-hosted git repository. spmallette pushed a commit to branch TINKERPOP-2420 in repository https://gitbox.apache.org/repos/asf/tinkerpop.git The following commit(s) were added to refs/heads/TINKERPOP-2420 by this push: new ea2e63b TINKERPOP-2420 Added docs for request options to all GLVs ea2e63b is described below commit ea2e63b418784b5bb0ad5be6aa3a9dc00ef4 Author: Stephen Mallette AuthorDate: Mon Oct 5 20:09:47 2020 -0400 TINKERPOP-2420 Added docs for request options to all GLVs --- CHANGELOG.asciidoc | 2 +- docs/src/reference/gremlin-variants.asciidoc | 30 ++-- docs/src/upgrade/release-3.4.x.asciidoc| 32 ++ .../Docs/Reference/GremlinVariantsTests.cs | 18 4 files changed, 79 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index ef6c7a3..fe320c5 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -30,7 +30,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima * Removed `Connection` from `Connection Pool` when server closes a connection with no pending requests in Java Driver. * Improved initialization time of Java Driver if the default serializer is replaced. * Deprecated `withGraph()` in favor of `withEmbedded()` on `AnonymousTraversalSource`. -* Added support for per-request level configurations, like timeouts, in Python and Javascript. +* Added support for per-request level configurations, like timeouts, in .NET, Python and Javascript. * Fixed bug in Javascript `Translator` that wasn't handling child traversals well. * Implemented `AutoCloseable` on `MultiIterator`. * Fixed an iterator leak in `HasContainer`. diff --git a/docs/src/reference/gremlin-variants.asciidoc b/docs/src/reference/gremlin-variants.asciidoc index 70c084e..066f5d0 100644 --- a/docs/src/reference/gremlin-variants.asciidoc +++ b/docs/src/reference/gremlin-variants.asciidoc @@ -684,7 +684,7 @@ Some connection options can also be set on individual requests made through the [source,python] -vertices = g.with_('evaluationTimeout', 500L).V().out('knows').toList() +vertices = g.with_('evaluationTimeout', 500).V().out('knows').toList() The following options are allowed on a per-request basis in this fashion: `batchSize`, `requestId`, `userAgent` and @@ -1121,6 +1121,18 @@ the remote end. include::../../../gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Docs/Reference/GremlinVariantsTests.cs[tags=connecting] +Some connection options can also be set on individual requests made through the using `With()` step on the +`TraversalSource`. For instance to set request timeout to 500 milliseconds: + +[source,csharp] + +var l = g.With(Tokens.ArgsEvalTimeout, 500).V().Out("knows").Count(); + + +The following options are allowed on a per-request basis in this fashion: `batchSize`, `requestId`, `userAgent` and +`evaluationTimeout` (formerly 'scriptEvaluationTimeout' which is also supported but now deprecated). These options are +available as constants on the `Gremlin.Net.Driver.Tokens` class. + [[gremlin-dotnet-imports]] === Common Imports @@ -1246,6 +1258,20 @@ var gremlinServer = new GremlinServer("localhost", 8182); var client = new GremlinClient(gremlinServer, sessionId: Guid.NewGuid().ToString())) + Per Request Settings + +The `GremlinClient.submit()` functions accept an option to build a raw `RequestMessage`. A good use-case for this +feature is to set a per-request override to the `evaluationTimeout` so that it only applies to the current request. + +[source,csharp] + +include::../../../gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Docs/Reference/GremlinVariantsTests.cs[tags=submittingScriptsWithTimeout] + + +The following options are allowed on a per-request basis in this fashion: `batchSize`, `requestId`, `userAgent` and +`evaluationTimeout` (formerly 'scriptEvaluationTimeout' which is also supported but now deprecated). These options are +available as constants on the `Gremlin.Net.Driver.Tokens` class. + anchor:gremlin-net-dsl[] [[gremlin-dotnet-dsl]] === Domain Specific Languages @@ -1418,7 +1444,7 @@ Some connection options can also be set on individual requests made through the [source,javascript] -const vertices = await g.with_('evaluationTimeout', 500L).V().out('knows').toList() +const vertices = await g.with_('evaluationTimeout', 500).V().out('knows').toList() The following options are allowed on a per-request basis in this fashion: `batchSize`, `requestId`, `userAgent` and diff --git a/docs/src/upgrade/release-3.4.x.asciidoc b/docs/src/upgrade/release-3.4.x.asciidoc index a1bf501..40b2a68 100644 --- a/docs/src/upgrade/release-3.4.x.asciidoc +++ b/docs/src/upgrade/release-3.4.x.asciidoc @@ -70,6 +70,38 @@ const sg = g.withStrategies( See: link:https://issues.apache.org/jira/bro
[tinkerpop] branch TINKERPOP-2420 updated: TINKERPOP-2420 Added docs for request options to all GLVs
This is an automated email from the ASF dual-hosted git repository. spmallette pushed a commit to branch TINKERPOP-2420 in repository https://gitbox.apache.org/repos/asf/tinkerpop.git The following commit(s) were added to refs/heads/TINKERPOP-2420 by this push: new ea2e63b TINKERPOP-2420 Added docs for request options to all GLVs ea2e63b is described below commit ea2e63b418784b5bb0ad5be6aa3a9dc00ef4 Author: Stephen Mallette AuthorDate: Mon Oct 5 20:09:47 2020 -0400 TINKERPOP-2420 Added docs for request options to all GLVs --- CHANGELOG.asciidoc | 2 +- docs/src/reference/gremlin-variants.asciidoc | 30 ++-- docs/src/upgrade/release-3.4.x.asciidoc| 32 ++ .../Docs/Reference/GremlinVariantsTests.cs | 18 4 files changed, 79 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index ef6c7a3..fe320c5 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -30,7 +30,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima * Removed `Connection` from `Connection Pool` when server closes a connection with no pending requests in Java Driver. * Improved initialization time of Java Driver if the default serializer is replaced. * Deprecated `withGraph()` in favor of `withEmbedded()` on `AnonymousTraversalSource`. -* Added support for per-request level configurations, like timeouts, in Python and Javascript. +* Added support for per-request level configurations, like timeouts, in .NET, Python and Javascript. * Fixed bug in Javascript `Translator` that wasn't handling child traversals well. * Implemented `AutoCloseable` on `MultiIterator`. * Fixed an iterator leak in `HasContainer`. diff --git a/docs/src/reference/gremlin-variants.asciidoc b/docs/src/reference/gremlin-variants.asciidoc index 70c084e..066f5d0 100644 --- a/docs/src/reference/gremlin-variants.asciidoc +++ b/docs/src/reference/gremlin-variants.asciidoc @@ -684,7 +684,7 @@ Some connection options can also be set on individual requests made through the [source,python] -vertices = g.with_('evaluationTimeout', 500L).V().out('knows').toList() +vertices = g.with_('evaluationTimeout', 500).V().out('knows').toList() The following options are allowed on a per-request basis in this fashion: `batchSize`, `requestId`, `userAgent` and @@ -1121,6 +1121,18 @@ the remote end. include::../../../gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Docs/Reference/GremlinVariantsTests.cs[tags=connecting] +Some connection options can also be set on individual requests made through the using `With()` step on the +`TraversalSource`. For instance to set request timeout to 500 milliseconds: + +[source,csharp] + +var l = g.With(Tokens.ArgsEvalTimeout, 500).V().Out("knows").Count(); + + +The following options are allowed on a per-request basis in this fashion: `batchSize`, `requestId`, `userAgent` and +`evaluationTimeout` (formerly 'scriptEvaluationTimeout' which is also supported but now deprecated). These options are +available as constants on the `Gremlin.Net.Driver.Tokens` class. + [[gremlin-dotnet-imports]] === Common Imports @@ -1246,6 +1258,20 @@ var gremlinServer = new GremlinServer("localhost", 8182); var client = new GremlinClient(gremlinServer, sessionId: Guid.NewGuid().ToString())) + Per Request Settings + +The `GremlinClient.submit()` functions accept an option to build a raw `RequestMessage`. A good use-case for this +feature is to set a per-request override to the `evaluationTimeout` so that it only applies to the current request. + +[source,csharp] + +include::../../../gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Docs/Reference/GremlinVariantsTests.cs[tags=submittingScriptsWithTimeout] + + +The following options are allowed on a per-request basis in this fashion: `batchSize`, `requestId`, `userAgent` and +`evaluationTimeout` (formerly 'scriptEvaluationTimeout' which is also supported but now deprecated). These options are +available as constants on the `Gremlin.Net.Driver.Tokens` class. + anchor:gremlin-net-dsl[] [[gremlin-dotnet-dsl]] === Domain Specific Languages @@ -1418,7 +1444,7 @@ Some connection options can also be set on individual requests made through the [source,javascript] -const vertices = await g.with_('evaluationTimeout', 500L).V().out('knows').toList() +const vertices = await g.with_('evaluationTimeout', 500).V().out('knows').toList() The following options are allowed on a per-request basis in this fashion: `batchSize`, `requestId`, `userAgent` and diff --git a/docs/src/upgrade/release-3.4.x.asciidoc b/docs/src/upgrade/release-3.4.x.asciidoc index a1bf501..40b2a68 100644 --- a/docs/src/upgrade/release-3.4.x.asciidoc +++ b/docs/src/upgrade/release-3.4.x.asciidoc @@ -70,6 +70,38 @@ const sg = g.withStrategies( See: link:https://issues.apache.org/jira/bro
[GitHub] [tinkerpop] bobsut opened a new pull request #1338: [TINKERPOP-2433] fix typogarphical error
bobsut opened a new pull request #1338: URL: https://github.com/apache/tinkerpop/pull/1338 [[TINKERPOP-2433](https://issues.apache.org/jira/browse/TINKERPOP-2433)] Fix a simple typo This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [tinkerpop] sergsalo opened a new pull request #1337: improve toString for the Bytecode and unit test
sergsalo opened a new pull request #1337: URL: https://github.com/apache/tinkerpop/pull/1337 according to the documentation the Bytecode to string should produce valid Bytecode encoding. [ ["V", [1]], ["repeat", [[ ["out", ["knows"]] ["hasLabel", ["person"] ["times", [2]] ["values", ["name"]] ] #TINKERPOP-2432 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[tinkerpop] 01/01: TINKERPOP-2420 Added with() support for request options in C#
This is an automated email from the ASF dual-hosted git repository. spmallette pushed a commit to branch TINKERPOP-2420 in repository https://gitbox.apache.org/repos/asf/tinkerpop.git commit 637be9253bcf0a5eaf1dda47663eb3e770b4042f Author: Stephen Mallette AuthorDate: Fri Oct 2 16:52:39 2020 -0400 TINKERPOP-2420 Added with() support for request options in C# --- gremlin-dotnet/glv/GraphTraversalSource.template | 24 + gremlin-dotnet/glv/generate.groovy | 1 + .../Driver/Remote/DriverRemoteConnection.cs| 30 ++-- gremlin-dotnet/src/Gremlin.Net/Driver/Tokens.cs| 28 ++- .../Process/Traversal/GraphTraversalSource.cs | 26 +- .../DriverRemoteConnection/GraphTraversalTests.cs | 14 .../apache/tinkerpop/gremlin/driver/Tokens.java| 40 ++ 7 files changed, 137 insertions(+), 26 deletions(-) diff --git a/gremlin-dotnet/glv/GraphTraversalSource.template b/gremlin-dotnet/glv/GraphTraversalSource.template index f3093e5..4ccf77f 100644 --- a/gremlin-dotnet/glv/GraphTraversalSource.template +++ b/gremlin-dotnet/glv/GraphTraversalSource.template @@ -72,6 +72,30 @@ namespace Gremlin.Net.Process.Traversal Bytecode = bytecode; } +public GraphTraversalSource With(string key) +{ +return With(key, true); +} + +public GraphTraversalSource With(string key, object value) +{ +var optionsStrategyInst = Bytecode.SourceInstructions.Find( +inst => inst.OperatorName == "withStrategies" && inst.Arguments[0] is OptionsStrategy); +OptionsStrategy optionsStrategy; + +if (optionsStrategyInst == null) +{ +optionsStrategy = new OptionsStrategy(); +optionsStrategy.Configuration[key] = value; +return WithStrategies(optionsStrategy); +} + +optionsStrategy = optionsStrategyInst.Arguments[0]; +optionsStrategy.Configuration[key] = value; +return new GraphTraversalSource(new List(TraversalStrategies), +new Bytecode(Bytecode)); +} + <% sourceStepMethods.each{ method -> %> public GraphTraversalSource <%= toCSharpMethodName.call(method.methodName) %>(<%= method.parameters %>) { diff --git a/gremlin-dotnet/glv/generate.groovy b/gremlin-dotnet/glv/generate.groovy index 26daa58..a951907 100644 --- a/gremlin-dotnet/glv/generate.groovy +++ b/gremlin-dotnet/glv/generate.groovy @@ -256,6 +256,7 @@ def binding = ["pmethods": P.class.getMethods(). findAll { GraphTraversalSource.class.equals(it.returnType) }. findAll { !it.name.equals("clone") && + !it.name.equals(TraversalSource.Symbols.with) && !it.name.equals(TraversalSource.Symbols.withRemote) && !it.name.equals(TraversalSource.Symbols.withComputer) }. diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/Remote/DriverRemoteConnection.cs b/gremlin-dotnet/src/Gremlin.Net/Driver/Remote/DriverRemoteConnection.cs index a52cb87..510a2f4 100644 --- a/gremlin-dotnet/src/Gremlin.Net/Driver/Remote/DriverRemoteConnection.cs +++ b/gremlin-dotnet/src/Gremlin.Net/Driver/Remote/DriverRemoteConnection.cs @@ -27,6 +27,7 @@ using System.Threading.Tasks; using Gremlin.Net.Driver.Messages; using Gremlin.Net.Process.Remote; using Gremlin.Net.Process.Traversal; +using Gremlin.Net.Process.Traversal.Strategy.Decoration; namespace Gremlin.Net.Driver.Remote { @@ -37,6 +38,15 @@ namespace Gremlin.Net.Driver.Remote { private readonly IGremlinClient _client; private readonly string _traversalSource; + +/// +/// Filter on these keys provided to OptionsStrategy and apply them to the request. Note that +/// "scriptEvaluationTimeout" was deprecated in 3.3.9 but still supported in server implementations and will +/// be removed in later versions. +/// +private readonly List _allowedKeys = new List +{Tokens.ArgsEvalTimeout, "scriptEvaluationTimeout", Tokens.ArgsBatchSize, + Tokens.RequestId, Tokens.ArgsUserAgent}; /// /// Initializes a new using "g" as the default remote TraversalSource name. @@ -78,9 +88,23 @@ namespace Gremlin.Net.Driver.Remote .Processor(Tokens.ProcessorTraversal) .OverrideRequestId(requestid) .AddArgument(Tokens.ArgsGremlin, bytecode) -.AddArgument(Tokens.ArgsAliases, new Dictionary {{"g", _traversalSource}}) -.Create(); -return await _client.SubmitAsync(requestMsg).ConfigureAwait(false); +.AddArgument(Tokens.Args
[tinkerpop] branch TINKERPOP-2420 updated (5ef6bf3 -> 637be92)
This is an automated email from the ASF dual-hosted git repository. spmallette pushed a change to branch TINKERPOP-2420 in repository https://gitbox.apache.org/repos/asf/tinkerpop.git. discard 5ef6bf3 TINKERPOP-2420 Added with() support for request options in C# new 637be92 TINKERPOP-2420 Added with() support for request options in C# This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (5ef6bf3) \ N -- N -- N refs/heads/TINKERPOP-2420 (637be92) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. 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. Summary of changes: .../Driver/Remote/DriverRemoteConnection.cs| 11 -- gremlin-dotnet/src/Gremlin.Net/Driver/Tokens.cs| 28 ++- .../DriverRemoteConnection/GraphTraversalTests.cs | 3 +- .../apache/tinkerpop/gremlin/driver/Tokens.java| 40 ++ 4 files changed, 71 insertions(+), 11 deletions(-)
[GitHub] [tinkerpop] spmallette merged pull request #1332: TINKERPOP-2364 Hide injected profile() steps in metrics output
spmallette merged pull request #1332: URL: https://github.com/apache/tinkerpop/pull/1332 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[tinkerpop] 01/02: Merge branch 'TINKERPOP-2364' into 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 1bddbbaef087ab08cb7977cfcca3ba4041e4ea8e Merge: e364b0a 7cc3475 Author: Stephen Mallette AuthorDate: Mon Oct 5 07:56:09 2020 -0400 Merge branch 'TINKERPOP-2364' into 3.4-dev CHANGELOG.asciidoc| 1 + .../tinkerpop/gremlin/structure/util/StringFactory.java | 11 ++- 2 files changed, 11 insertions(+), 1 deletion(-)
[tinkerpop] branch 3.4-dev updated (e364b0a -> 1bddbba)
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 e364b0a Improved clone() test in python add 7cc3475 TINKERPOP-2364 Hide injected profile() steps in metrics output add 1bddbba Merge branch 'TINKERPOP-2364' into 3.4-dev No new revisions were added by this update. Summary of changes: CHANGELOG.asciidoc| 1 + .../tinkerpop/gremlin/structure/util/StringFactory.java | 11 ++- 2 files changed, 11 insertions(+), 1 deletion(-)
[tinkerpop] branch master updated (f52ee7c -> b66805c)
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 f52ee7c Merge branch '3.4-dev' add 7cc3475 TINKERPOP-2364 Hide injected profile() steps in metrics output new 1bddbba Merge branch 'TINKERPOP-2364' into 3.4-dev new b66805c 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 + .../tinkerpop/gremlin/structure/util/StringFactory.java | 11 ++- 2 files changed, 11 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 b66805cda137887b8499ab6c0452f8cc2f378b1f Merge: f52ee7c 1bddbba Author: Stephen Mallette AuthorDate: Mon Oct 5 07:56:17 2020 -0400 Merge branch '3.4-dev' CHANGELOG.asciidoc| 1 + .../tinkerpop/gremlin/structure/util/StringFactory.java | 11 ++- 2 files changed, 11 insertions(+), 1 deletion(-)
[tinkerpop] branch master updated (f556757 -> f52ee7c)
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 f556757 Merge branch '3.4-dev' add e364b0a Improved clone() test in python new f52ee7c Merge branch '3.4-dev' 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. Summary of changes: .../src/main/python/tests/driver/test_driver_remote_connection.py | 8 1 file changed, 4 insertions(+), 4 deletions(-)
[tinkerpop] 01/01: 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 f52ee7c058ac2ceb0155d1c0cba23e5da4267b44 Merge: f556757 e364b0a Author: Stephen Mallette AuthorDate: Mon Oct 5 07:38:36 2020 -0400 Merge branch '3.4-dev' .../src/main/python/tests/driver/test_driver_remote_connection.py | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --cc gremlin-python/src/main/python/tests/driver/test_driver_remote_connection.py index b26749a,000..bb7793f mode 100644,00..100644 --- a/gremlin-python/src/main/python/tests/driver/test_driver_remote_connection.py +++ b/gremlin-python/src/main/python/tests/driver/test_driver_remote_connection.py @@@ -1,226 -1,0 +1,226 @@@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +import pytest + +from gremlin_python import statics +from gremlin_python.driver.protocol import GremlinServerError +from gremlin_python.statics import long +from gremlin_python.process.traversal import Traverser +from gremlin_python.process.traversal import TraversalStrategy +from gremlin_python.process.traversal import Bindings +from gremlin_python.process.traversal import P, Order, T +from gremlin_python.process.graph_traversal import __ +from gremlin_python.process.anonymous_traversal import traversal +from gremlin_python.structure.graph import Vertex +from gremlin_python.process.strategies import SubgraphStrategy, ReservedKeysVerificationStrategy, SeedStrategy +from gremlin_python.structure.io.util import HashableDict +from gremlin_python.driver.serializer import GraphSONSerializersV2d0 + +__author__ = 'Marko A. Rodriguez (http://markorodriguez.com)' + + +class TestDriverRemoteConnection(object): +def test_traversals(self, remote_connection): +statics.load_statics(globals()) +g = traversal().withRemote(remote_connection) + +assert long(6) == g.V().count().toList()[0] +# # +assert Vertex(1) == g.V(1).next() +assert 1 == g.V(1).id().next() +assert Traverser(Vertex(1)) == g.V(1).nextTraverser() +assert 1 == len(g.V(1).toList()) +assert isinstance(g.V(1).toList(), list) +results = g.V().repeat(out()).times(2).name +results = results.toList() +assert 2 == len(results) +assert "lop" in results +assert "ripple" in results +# # +assert 10 == g.V().repeat(both()).times(5)[0:10].count().next() +assert 1 == g.V().repeat(both()).times(5)[0:1].count().next() +assert 0 == g.V().repeat(both()).times(5)[0:0].count().next() +assert 4 == g.V()[2:].count().next() +assert 2 == g.V()[:2].count().next() +# # +results = g.withSideEffect('a', ['josh', 'peter']).V(1).out('created').in_('created').values('name').where(P.within('a')).toList() +assert 2 == len(results) +assert 'josh' in results +assert 'peter' in results +# # +results = g.V().out().profile().toList() +assert 1 == len(results) +assert 'metrics' in results[0] +assert 'dur' in results[0] +# # +results = g.V().has('name', 'peter').as_('a').out('created').as_('b').select('a', 'b').by( +__.valueMap()).toList() +assert 1 == len(results) +assert 'peter' == results[0]['a']['name'][0] +assert 35 == results[0]['a']['age'][0] +assert 'lop' == results[0]['b']['name'][0] +assert 'java' == results[0]['b']['lang'][0] +assert 2 == len(results[0]['a']) +assert 2 == len(results[0]['b']) +# # +results = g.V(1).inject(g.V(2).next()).values('name').toList() +assert 2 == len(results) +assert 'marko' in results +assert 'vadas' in results +# # +results = g.V().has('person', 'name', 'marko').map(lambda: ("it.get().value('name')", "gremlin-groovy")).toList() +assert 1 == len(results) +assert 'marko' in results +# # +# this test just validates that the underscored versions of steps conflicting
[tinkerpop] branch 3.4-dev updated (ce55968 -> e364b0a)
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 ce55968 Fixed broken link in docs CTR add e364b0a Improved clone() test in python No new revisions were added by this update. Summary of changes: .../src/main/jython/tests/driver/test_driver_remote_connection.py | 8 1 file changed, 4 insertions(+), 4 deletions(-)