[
https://issues.apache.org/jira/browse/TINKERPOP-3244?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18077872#comment-18077872
]
ASF GitHub Bot commented on TINKERPOP-3244:
-------------------------------------------
Cole-Greer commented on PR #3416:
URL: https://github.com/apache/tinkerpop/pull/3416#issuecomment-4365353554
Thanks for opening the PR, the `NextN(n)` syntax seems like a good
workaround considering Go's lack of overloading support. Since this differs
from the other drivers, I think it might warrant a brief shoutout in the [Go
differences reference
docs](https://github.com/apache/tinkerpop/blob/3ad5a83983f46bc90f82079ce8d402549d696040/docs/src/reference/gremlin-variants.asciidoc?plain=1#L499-L500).
This should also get added to the Go translators in
[Java](https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/GoTranslateVisitor.java)
and
[JS](https://github.com/apache/tinkerpop/blob/master/gremlin-js/gremlin-javascript/lib/language/translator/GoTranslateVisitor.ts).
> Add next(n) batch iteration to gremlin-go for GLV parity
> --------------------------------------------------------
>
> Key: TINKERPOP-3244
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3244
> Project: TinkerPop
> Issue Type: Improvement
> Components: driver
> Affects Versions: 3.7.5, 3.8.1
> Reporter: Taylor Riggan
> Priority: Minor
>
> The Java, Python, and .NET GLVs all support `next\(n\)` on Traversal to
> retrieve multiple results at once, but gremlin-go only supports single-item
> `Next()` returning `(*Result, error)`. This creates an API inconsistency
> across GLVs that makes it harder to write portable examples and documentation.
> Currently, users must manually collect results from `GetResultSet()` +
> `One()` in a loop to achieve the same behavior. A `Next(n int) ([]*Result,
> error)` method on `Traversal` would bring gremlin-go in line with the other
> GLVs.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)