[
https://issues.apache.org/jira/browse/TINKERPOP-2420?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17211044#comment-17211044
]
ASF GitHub Bot commented on TINKERPOP-2420:
-------------------------------------------
FlorianHockmann commented on a change in pull request #1339:
URL: https://github.com/apache/tinkerpop/pull/1339#discussion_r502410597
##########
File path: gremlin-dotnet/src/Gremlin.Net/Driver/Tokens.cs
##########
@@ -74,24 +79,25 @@ public class Tokens
public static string ProcessorSession = "session";
/// <summary>
- /// Argument name that allows to defines the number of iterations
each ResponseMessage should contain - overrides the
- /// resultIterationBatchSize server setting.
+ /// Argument name that allows to definition of the number of
iterations each ResponseMessage should
Review comment:
(nitpick) _allows to definition_ doesn't sound right to me (?)
##########
File path: docs/src/reference/gremlin-variants.asciidoc
##########
@@ -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
Review comment:
_the using `With()` step_ -> _using the `With()` step_
##########
File path: docs/src/reference/gremlin-variants.asciidoc
##########
@@ -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
Review comment:
(nitpick) **S**ubmit (to stay with the .NET naming conventions)
##########
File path: docs/src/reference/gremlin-variants.asciidoc
##########
@@ -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();
Review comment:
I'm not sure about this but shouldn't we use a terminal step here to
actually get the count(s)? Especially new users would probably expect here to
have the count stored in the variable and not a traversal object.
##########
File path:
gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Process/Traversal/DriverRemoteConnection/GraphTraversalTests.cs
##########
@@ -201,22 +204,21 @@ public void ShouldUseBindingsInTraversal()
[Fact]
public void ShouldUseOptionsInTraversal()
{
- // smoke test to validate serialization of OptionsStrategy. no way
to really validate this from an integration
- // test perspective because there's no way to access the internals
of the strategy via bytecode
var connection = _connectionFactory.CreateRemoteConnection();
var options = new Dictionary<string,object>
{
{"x", "test"},
{"y", true}
};
var g =
AnonymousTraversalSource.Traversal().WithRemote(connection);
-
- var b = new Bindings();
+
var countWithStrategy = g.WithStrategies(new
OptionsStrategy(options)).V().Count().Next();
Assert.Equal(6, countWithStrategy);
+
+ Assert.Equal(ResponseStatusCode.ServerTimeout,
Assert.Throws<ResponseException>(() =>
Review comment:
(nitpick) I think it's easier to read and understand this when the two
asserts are separated:
```c#
var responseException = Assert.Throws<ResponseException>(() =>
g.With("y").With("x", "test").With(Tokens.ArgsEvalTimeout, 10).Inject(1)
.SideEffect(Lambda.Groovy("Thread.sleep(10000)")).Iterate());
Assert.Equal(ResponseStatusCode.ServerTimeout, responseException.StatusCode);
```
----------------------------------------------------------------
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:
[email protected]
> Support per query request options in .NET
> -----------------------------------------
>
> Key: TINKERPOP-2420
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2420
> Project: TinkerPop
> Issue Type: Improvement
> Components: dotnet
> Affects Versions: 3.4.8
> Reporter: Stephen Mallette
> Priority: Major
>
> This is the companion issue to TINKERPOP-2296 which added per query settings
> to Python. Similar functionality is required in .NET. This is the last GLV to
> require this feature - need to add upgrade docs with this change to cover all
> of them.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)