This is an automated email from the ASF dual-hosted git repository. L0Lmaker pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit 40fa3ef90d557196990715288ffe92a8c0fcdc83 Merge: 7175989121 a28cd1f2f1 Author: Rithin Kumar <[email protected]> AuthorDate: Mon May 18 00:27:16 2026 -0700 [TINKERPOP-3244] Add NextN(n) to Traversal in gremlin-go (#3416) Adds Traversal.NextN(n int) ([]*Result, error) to gremlin-go for batched result iteration, bringing API parity with next(n) in the Java, Python, and .NET GLVs. - Behavior matches the Java reference: returns up to n results, returns what is available if fewer exist, returns an empty slice for non-positive n, and surfaces ResultSet errors to the caller - Named NextN rather than overloading Next() because Go does not support method overloading; follows existing gremlin-go convention for split overloads (e.g. ResultSet.One vs ResultSet.All) - Wires NextN(n) into the gremlin-core GoTranslateVisitor and the gremlin-javascript Go translator; bare next() continues to translate to Next() - Documents the divergence in the gremlin-variants reference docs Assisted-by: Claude Code:claude-opus-4-7 CHANGELOG.asciidoc | 1 + docs/src/reference/gremlin-variants.asciidoc | 6 +- .../language/translator/GoTranslateVisitor.java | 13 +++ .../language/translator/GremlinTranslatorTest.java | 2 +- gremlin-go/driver/traversal.go | 25 +++++ gremlin-go/driver/traversal_test.go | 117 +++++++++++++++++++++ .../lib/language/translator/GoTranslateVisitor.ts | 12 +++ .../unit/translator/gremlin-translator-test.js | 3 +- 8 files changed, 176 insertions(+), 3 deletions(-)
