-
Notifications
You must be signed in to change notification settings - Fork 841
TINKERPOP-1868 Gremlin.Net: Add Inject step to GraphTraversalSource #776
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
VOTE: +1 |
|
If this is a breaking change for .NET users in some way, it would be good to write something in the upgrade documentation about it. A changelog entry would also be good (either way). |
|
I don't think that it is a breaking change as it only prevents users from sending traversals with invalid arguments for the |
|
ah - ok. i get what is happening now. thanks for clarifying. in that case: VOTE +1 |
| { | ||
| <% if (method.parameters.contains("params ")) { | ||
| %> var args = new List<object>(<%= method.paramNames.init().size() %> + <%= method.paramNames.last() %>.Length) {<%= method.paramNames.init().join(", ") %>}; | ||
| %> var args = new List< <%= method.argsListType %> >(<%= method.paramNames.init().size() %> + <%= method.paramNames.last() %>.Length) {<%= method.paramNames.init().join(", ") %>}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we do something about the extra spacing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 - would love to give a cleanup to all our templates. they all have little spacing issues like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, those spaces shouldn't be there and I just found a way to remove them: Variables can be used in a Groovy template in the form of $variable which avoids the problem with the double < as <<%= variable %>> doesn't work.
I pushed a commit that should remove all those unnecessary spaces from the generated classes in Gremlin.Net (at least I hope that I got all).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, nice!
I've reviewed the end result and looks good.
|
Looks great, I've added comment / question above but its just a nit. VOTE +1 |
https://issues.apache.org/jira/browse/TINKERPOP-1868
This adds the
Injectstep toGraphTraversalSourcefor Gremlin.Net. While working on this I also noticed that the interface wasn't optimal for the existingGraphTraversalInjectstep as it accepted aparams object[] injectionsalthough it should only exceptinjectionsof the generic typeE. So I also fixed that.Method signature before:
and after:
Now, a traversal like the following isn't possible any more in Gremlin.Net:
as
Injectnow only accepts strings here (just like Gremlin-Java does).