[
https://issues.apache.org/jira/browse/TINKERPOP-1868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16325276#comment-16325276
]
ASF GitHub Bot commented on TINKERPOP-1868:
-------------------------------------------
GitHub user FlorianHockmann opened a pull request:
https://github.com/apache/tinkerpop/pull/776
TINKERPOP-1868 Gremlin.Net: Add Inject step to GraphTraversalSource
https://issues.apache.org/jira/browse/TINKERPOP-1868
This adds the `Inject` step to `GraphTraversalSource` for Gremlin.Net.
While working on this I also noticed that the interface wasn't optimal for the
existing `GraphTraversal` `Inject` step as it accepted a `params object[]
injections` although it should only except `injections` of the generic type
`E`. So I also fixed that.
Method signature before:
```
public GraphTraversal< S , E > Inject (params object[] injections)
```
and after:
```
public GraphTraversal< S , E > Inject (params E[] injections)
```
Now, a traversal like the following isn't possible any more in Gremlin.Net:
```
g.V().Values<string>("name").Inject(1).ToList();
```
as `Inject` now only accepts strings here (just like Gremlin-Java does).
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/apache/tinkerpop TINKERPOP-1868
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/tinkerpop/pull/776.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #776
----
commit 1b13f052629170097e303680e1a0da5fd9e2bfac
Author: florianhockmann <fh@...>
Date: 2018-01-12T17:13:45Z
Add GraphTraversalSource.Inject TINKERPOP-1868
commit 944c2c8711db585f1ce17fd382ecfb96c4a87bc3
Author: florianhockmann <fh@...>
Date: 2018-01-13T18:05:03Z
Make Injects signature type-safe TINKERPOP-1868
----
> Support inject source step in Gremlin.Net
> -----------------------------------------
>
> Key: TINKERPOP-1868
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1868
> Project: TinkerPop
> Issue Type: Improvement
> Components: dotnet
> Affects Versions: 3.2.7, 3.3.1
> Reporter: Florian Hockmann
> Priority: Minor
>
> {{GraphTraversalSource}} has no {{Inject}} step in Gremlin.Net because it's
> explicitly excluded in the GLV generation:
> {code}
> "sourceSpawnMethods": GraphTraversalSource.getMethods(). // SPAWN STEPS
> findAll { GraphTraversal.class.equals(it.returnType)
> && !it.name.equals('inject')}.
> // ...
> {code}
> I don't know why {{inject}} is explicitly excluded here, but there should be
> an implementation in {{GraphTraversalSource}} as the other GLVs also have
> this step.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)