This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
The following commit(s) were added to refs/heads/master by this push:
new 6c3601fac2 Fix broken C# examples in the Gremlin.Net differences
reference
6c3601fac2 is described below
commit 6c3601fac29f51ac997ed1f9d38ce84805d4daeb
Author: Stephen Mallette <[email protected]>
AuthorDate: Fri Sep 25 10:33:25 2026 +0000
Fix broken C# examples in the Gremlin.Net differences reference
Correct two static C# snippets in the Gremlin.Net "Differences" section so
they compile against the Gremlin.Net API. The ElementMap() example now
supplies the explicit generic (ElementMap<object>()) that the section itself
requires, and the cardinality prose uses the real PascalCase members
CardinalityValue.List(value), CardinalityValue.Set(value), and
CardinalityValue.Single(value), with a short usage example. Also reorder the
section so the null-key GroupCount discussion is contiguous and the
cardinality note reads last.
Assisted-by: Kiro:claude-opus-4.8
---
docs/src/reference/gremlin-variants.asciidoc | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/docs/src/reference/gremlin-variants.asciidoc
b/docs/src/reference/gremlin-variants.asciidoc
index b759418f3b..556bb17e69 100644
--- a/docs/src/reference/gremlin-variants.asciidoc
+++ b/docs/src/reference/gremlin-variants.asciidoc
@@ -3133,7 +3133,7 @@ would become the following in C#:
----
g.V().Has("Person","name","marko").
Out("knows").
- ElementMap().ToList();
+ ElementMap<object>().ToList();
----
In addition to the uppercase change, also note the conversion of the single
quotes to double quotes as is expected for
@@ -3166,10 +3166,6 @@ g.V().GroupCount<object>().By("age")
where "age" is not a valid key for all vertices in a way that will remove the
need for a `null` to be returned.
-Finally, the enum construct for `Cardinality` cannot have functions attached
to it the way it can be done in Java,
-therefore cardinality functions that take a value like `list()`, `set()`, and
`single()` are referenced from a
-`CardinalityValue` class rather than `Cardinality` itself.
-
[source,csharp]
----
g.V().Has("age").GroupCount<object>().By("age")
@@ -3179,6 +3175,15 @@ g.V().HasLabel("person").GroupCount<object>().By("age")
Either of the above two options accomplishes the desired goal as both prevent
`groupCount()` from having to process
the possibility of `null`.
+Finally, the enum construct for `Cardinality` cannot have functions attached
to it the way it can be done in Java,
+therefore cardinality functions that take a value like
`CardinalityValue.List(value)`, `CardinalityValue.Set(value)`,
+and `CardinalityValue.Single(value)` are referenced from a `CardinalityValue`
class rather than `Cardinality` itself.
+
+[source,csharp]
+----
+g.AddV("person").Property("nicknames", CardinalityValue.List("okram"));
+----
+
anchor:gremlin-net-limitations[]
[[gremlin-dotnet-limitations]]
=== Limitations