Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
0bccf87
Align GValue support and validation across Python, .NET, and Go GLVs
Cole-Greer Jun 4, 2026
c2e2816
Add GValue implementation to the JavaScript GLV
Cole-Greer Jun 5, 2026
e7b4789
Add nested-GValue guard across all GLVs
Cole-Greer Jun 5, 2026
aa766f2
Add GValue overloads to .NET traversal steps for parity with Java
Cole-Greer Jun 5, 2026
3f2af70
Fix AnonymousTraversal_OutXnullX after GValue varargs overloads
Cole-Greer Jun 8, 2026
6ca6d4d
Add parameterize GValue feature-test variant to the .NET GLV
Cole-Greer Jun 8, 2026
0744888
Add parameterize GValue feature-test variant to the Go GLV
Cole-Greer Jun 8, 2026
35bef9c
Add parameterize GValue feature-test variant to the JavaScript GLV
Cole-Greer Jun 9, 2026
c9dba53
Add generated dotnet_parameterize translations and remove dead code
Cole-Greer Jun 9, 2026
d67f95b
Add nested child-traversal GValue binding unit tests to Go and Python
Cole-Greer Jun 9, 2026
96939ca
Interleave .NET GValue step overloads with their value-typed siblings
Cole-Greer Jun 10, 2026
836718a
Simplify GValue name validation across Java and all GLVs
Cole-Greer Jun 10, 2026
25cc2cd
Replace Go GValue constructor with an exported-field struct
Cole-Greer Jun 10, 2026
19f7301
Document GValue name validation change and JavaScript GValue support
Cole-Greer Jun 10, 2026
25d14ed
Add 3.8-to-4.0 upgrade note for GValue in the language variants
Cole-Greer Jun 11, 2026
6d2e1c1
Align GValue parameter-name validation with Java across all GLVs
Cole-Greer Jun 11, 2026
d0e3fad
Add tests, javadoc, and docs for the GValue/.NET parameterize translator
Cole-Greer Jun 19, 2026
4c58e17
Remove DOTNET_PARAMETERIZE enum constant in favor of direct visitor c…
Cole-Greer Jun 22, 2026
1819657
Document and de-duplicate the .NET test-data parameter substitution
Cole-Greer Jun 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
* Modified HTTP API to expect gremlin-lang strings for parameters and update all GLVs to send requests in new format.
* Added string parameter parsing to `GremlinServer` to prevent traversal injection and excessive nesting depths.
* Modified all GLVs to detect unsupported types in `GremlinLang` and throw consistent error for that case.
* Extended `GValue` parameterization to all GLVs (`gremlin-python`, `gremlin-go`, `gremlin-javascript`, `gremlin-dotnet`), allowing parameters to be passed directly in traversals as in Java.
* Relaxed `GValue` name validation by removing the reserved leading underscore restriction.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't this PR do a bit more than just this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR did more, but I'm writing the changelog from the perspective of an upgrade from 3.8. This is really the only notable changes from GValue in 3.8 Java. The other GLVs didn't have GValue before as it was tied into bytecode bindings. From the perspective of the 3.8 upgrade, there isn't really changes to GValue in the GLVs, it's a fresh start which is consistent with the existing Java pattern.

I can add a new entry detailing that GValue has been extended to all GLVs, but I don't think the modifications warrant changelog entries here.

* Added GraphBinary 4.0 `Graph` (`0x10`) serializer/deserializer to `gremlin-javascript`, `gremlin-dotnet`, and `gremlin-go` so that `subgraph()` results are returned as a detached `Graph` data container.

[[release-4-0-0-beta-2]]
Expand Down
18 changes: 15 additions & 3 deletions docs/src/reference/gremlin-variants.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,8 @@ the traversal to utilize a parameter in place of a literal.

[source,go]
----
g.V().Has("name", gremlingo.NewGValue("name", "marko"))
g.V().Has("name", gremlingo.GValue{Name: "name", Value: "marko"})
g.MergeV(gremlingo.GValue{Name: "vertexPattern", Value: map[interface{}]interface{}{"name": "marko"}})
----

[[gremlin-go-scripts]]
Expand Down Expand Up @@ -1852,8 +1853,17 @@ Promise.all([
[[gremlin-javascript-gvalue]]
=== GValue Parameterization

IMPORTANT: 4.0.0-beta.2 Release - `GValue` parameterization is not yet implemented for the JavaScript driver. This
functionality is planned for a future release.
A `GValue` is an encapsulation of a parameter name and value. A <<traversal-parameterization,subset of gremlin steps>>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JavaScript had no GValue at all; Python/.NET/Go diverged on validation, duplicate detection, and string representation.

shouldn't we have more docs then? like "GValue Parameterization" sections for all variants?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Javascript was the only GLV which was missing the "GValue Parameterization" section altogether, other than the go GValue construction edit, there were no changes needed to the existing docs here.

One slight exception is some GLVs include 2 examples (has() and mergeV()), while others only have the has() example. I'll add the merge example everywhere for consistency.

are able to accept GValues. When constructing a `GraphTraversal` with such steps in JavaScript, a GValue may be passed
in the traversal to utilize a parameter in place of a literal.

[source,javascript]
----
const GValue = gremlin.process.GValue;

g.V().has('name', new GValue('name', 'marko'));
g.mergeV(new GValue('vertexPattern', { name: 'marko' }));
----

[[gremlin-javascript-scripts]]
=== Submitting Scripts
Expand Down Expand Up @@ -2398,6 +2408,8 @@ the traversal to utilize a parameter in place of a literal.
[source,csharp]
----
g.V().Has("name", new GValue<string>("name", "marko"));
g.MergeV(new GValue<IDictionary<object, object>>("vertexPattern",
new Dictionary<object, object> { { "name", "marko" } }));
----

[[gremlin-dotnet-scripts]]
Expand Down
16 changes: 16 additions & 0 deletions docs/src/upgrade/release-4.x.x.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,22 @@ beyond this limit will be rejected with an error.

See: link:https://issues.apache.org/jira/browse/TINKERPOP-3247[TINKERPOP-3247]

==== GValue in the Language Variants

`GValue`, the named query-parameter wrapper introduced for Java in 3.8.0, is now available as a client-side API in all
of the Gremlin Language Variants. Users of the Python, JavaScript, .NET, and Go drivers can construct a `GValue` and
pass it to a parameterizable step; the driver sends the value to the server as a named parameter rather than inlining
it as a literal. See the "GValue Parameterization" reference documentation for
link:https://tinkerpop.apache.org/docs/4.0.0/reference/#gremlin-java-gvalue[Java],
link:https://tinkerpop.apache.org/docs/4.0.0/reference/#gremlin-python-gvalue[Python],
link:https://tinkerpop.apache.org/docs/4.0.0/reference/#gremlin-javascript-gvalue[JavaScript],
link:https://tinkerpop.apache.org/docs/4.0.0/reference/#gremlin-dotnet-gvalue[.NET], and
link:https://tinkerpop.apache.org/docs/4.0.0/reference/#gremlin-go-gvalue[Go] for construction syntax and examples.

The leading-underscore restriction on `GValue` names that was present in 3.8.0 has been removed. Parameter names
beginning with `_` are now accepted in Java and across all language variants. The only remaining constraints are that
a `GValue` may not wrap another `GValue`, and (in the non-Java drivers) its name may not be null.

==== JavaScript Typed Numeric Wrappers

JavaScript has a single `Number` type (IEEE 754 double) which loses the distinction between Gremlin numeric types like
Expand Down
Loading