This is an automated email from the ASF dual-hosted git repository. Cole-Greer pushed a commit to branch GValueFollowupTP4 in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit 389219c2cec374aba19a6c673085cbd90069d734 Author: Cole Greer <[email protected]> AuthorDate: Wed Jun 10 11:22:33 2026 -0700 Interleave .NET GValue step overloads with their value-typed siblings Moves the GValue<T> step overloads out of the block at the bottom of GraphTraversal.cs and __.cs so each sits immediately after the existing value-typed overload of the same step, matching the convention already used in GraphTraversalSource.cs. Pure reorganization with no behavior change (identical public method sets). Assisted-by: Kiro:claude-opus-4.8 --- .../Process/Traversal/GraphTraversal.cs | 619 ++++++++++----------- .../src/Gremlin.Net/Process/Traversal/__.cs | 434 +++++++-------- 2 files changed, 526 insertions(+), 527 deletions(-) diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs index cd6c0c4003..32605edecf 100644 --- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs +++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs @@ -131,6 +131,15 @@ namespace Gremlin.Net.Process.Traversal return Wrap<TStart, Edge>(this); } + /// <summary> + /// Adds the addE step to this <see cref="GraphTraversal{SType, EType}" />. + /// </summary> + public GraphTraversal<TStart, Edge> AddE (GValue<string> edgeLabel) + { + GremlinLang.AddStep("addE", edgeLabel); + return Wrap<TStart, Edge>(this); + } + /// <summary> /// Adds the addE step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> @@ -158,6 +167,15 @@ namespace Gremlin.Net.Process.Traversal return Wrap<TStart, Vertex>(this); } + /// <summary> + /// Adds the addV step to this <see cref="GraphTraversal{SType, EType}" />. + /// </summary> + public GraphTraversal<TStart, Vertex> AddV (GValue<string> vertexLabel) + { + GremlinLang.AddStep("addV", vertexLabel); + return Wrap<TStart, Vertex>(this); + } + /// <summary> /// Adds the addV step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> @@ -297,6 +315,19 @@ namespace Gremlin.Net.Process.Traversal return Wrap<TStart, Vertex>(this); } + /// <summary> + /// Adds the both step to this <see cref="GraphTraversal{SType, EType}" />. + /// </summary> + public GraphTraversal<TStart, Vertex> Both (GValue<string> edgeLabel, params GValue<string>[] otherEdgeLabels) + { + if (otherEdgeLabels == null) throw new ArgumentNullException(nameof(otherEdgeLabels)); + + var args = new List<object?>(1 + otherEdgeLabels.Length) { edgeLabel }; + args.AddRange(otherEdgeLabels); + GremlinLang.AddStep("both", args.ToArray()); + return Wrap<TStart, Vertex>(this); + } + /// <summary> /// Adds the bothE step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> @@ -310,6 +341,19 @@ namespace Gremlin.Net.Process.Traversal return Wrap<TStart, Edge>(this); } + /// <summary> + /// Adds the bothE step to this <see cref="GraphTraversal{SType, EType}" />. + /// </summary> + public GraphTraversal<TStart, Edge> BothE (GValue<string> edgeLabel, params GValue<string>[] otherEdgeLabels) + { + if (otherEdgeLabels == null) throw new ArgumentNullException(nameof(otherEdgeLabels)); + + var args = new List<object?>(1 + otherEdgeLabels.Length) { edgeLabel }; + args.AddRange(otherEdgeLabels); + GremlinLang.AddStep("bothE", args.ToArray()); + return Wrap<TStart, Edge>(this); + } + /// <summary> /// Adds the bothV step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> @@ -464,6 +508,24 @@ namespace Gremlin.Net.Process.Traversal return Wrap<TStart, TNewEnd>(this); } + /// <summary> + /// Adds the call step to this <see cref="GraphTraversal{SType, EType}" />. + /// </summary> + public GraphTraversal<TStart, TNewEnd> Call<TNewEnd> (string? service, GValue<IDictionary<object,object>> m) + { + GremlinLang.AddStep("call", service, m); + return Wrap<TStart, TNewEnd>(this); + } + + /// <summary> + /// Adds the call step to this <see cref="GraphTraversal{SType, EType}" />. + /// </summary> + public GraphTraversal<TStart, TNewEnd> Call<TNewEnd> (string? service, GValue<IDictionary<object,object>> m, ITraversal childTraversal) + { + GremlinLang.AddStep("call", service, m, childTraversal); + return Wrap<TStart, TNewEnd>(this); + } + /// <summary> /// Adds the cap step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> @@ -554,6 +616,15 @@ namespace Gremlin.Net.Process.Traversal return Wrap<TStart, TEnd>(this); } + /// <summary> + /// Adds the coin step to this <see cref="GraphTraversal{SType, EType}" />. + /// </summary> + public GraphTraversal<TStart, TEnd> Coin (GValue<double> probability) + { + GremlinLang.AddStep("coin", probability); + return Wrap<TStart, TEnd>(this); + } + /// <summary> /// Adds the combine step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> @@ -622,6 +693,15 @@ namespace Gremlin.Net.Process.Traversal return Wrap<TStart, TNewEnd>(this); } + /// <summary> + /// Adds the constant step to this <see cref="GraphTraversal{SType, EType}" />. + /// </summary> + public GraphTraversal<TStart, TNewEnd> Constant<TNewEnd> (GValue<TNewEnd> e) + { + GremlinLang.AddStep("constant", e); + return Wrap<TStart, TNewEnd>(this); + } + /// <summary> /// Adds the count step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> @@ -932,6 +1012,15 @@ namespace Gremlin.Net.Process.Traversal return Wrap<TStart, TEnd>(this); } + /// <summary> + /// Adds the from step to this <see cref="GraphTraversal{SType, EType}" />. + /// </summary> + public GraphTraversal<TStart, TEnd> From (GValue<object> fromVertex) + { + GremlinLang.AddStep("from", fromVertex); + return Wrap<TStart, TEnd>(this); + } + /// <summary> /// Adds the group step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> @@ -1013,6 +1102,24 @@ namespace Gremlin.Net.Process.Traversal return Wrap<TStart, TEnd>(this); } + /// <summary> + /// Adds the has step to this <see cref="GraphTraversal{SType, EType}" />. + /// </summary> + public GraphTraversal<TStart, TEnd> Has (GValue<string> label, string? propertyKey, object? value) + { + GremlinLang.AddStep("has", label, propertyKey, value); + return Wrap<TStart, TEnd>(this); + } + + /// <summary> + /// Adds the has step to this <see cref="GraphTraversal{SType, EType}" />. + /// </summary> + public GraphTraversal<TStart, TEnd> Has (GValue<string> label, string? propertyKey, P? predicate) + { + GremlinLang.AddStep("has", label, propertyKey, predicate); + return Wrap<TStart, TEnd>(this); + } + /// <summary> /// Adds the has step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> @@ -1115,6 +1222,19 @@ namespace Gremlin.Net.Process.Traversal return Wrap<TStart, TEnd>(this); } + /// <summary> + /// Adds the hasLabel step to this <see cref="GraphTraversal{SType, EType}" />. + /// </summary> + public GraphTraversal<TStart, TEnd> HasLabel (GValue<string> label, params GValue<string>[] otherLabels) + { + if (otherLabels == null) throw new ArgumentNullException(nameof(otherLabels)); + + var args = new List<object?>(1 + otherLabels.Length) { label }; + args.AddRange(otherLabels); + GremlinLang.AddStep("hasLabel", args.ToArray()); + return Wrap<TStart, TEnd>(this); + } + /// <summary> /// Adds the hasNot step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> @@ -1183,6 +1303,19 @@ namespace Gremlin.Net.Process.Traversal return Wrap<TStart, Vertex>(this); } + /// <summary> + /// Adds the in step to this <see cref="GraphTraversal{SType, EType}" />. + /// </summary> + public GraphTraversal<TStart, Vertex> In (GValue<string> edgeLabel, params GValue<string>[] otherEdgeLabels) + { + if (otherEdgeLabels == null) throw new ArgumentNullException(nameof(otherEdgeLabels)); + + var args = new List<object?>(1 + otherEdgeLabels.Length) { edgeLabel }; + args.AddRange(otherEdgeLabels); + GremlinLang.AddStep("in", args.ToArray()); + return Wrap<TStart, Vertex>(this); + } + /// <summary> /// Adds the inE step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> @@ -1196,6 +1329,19 @@ namespace Gremlin.Net.Process.Traversal return Wrap<TStart, Edge>(this); } + /// <summary> + /// Adds the inE step to this <see cref="GraphTraversal{SType, EType}" />. + /// </summary> + public GraphTraversal<TStart, Edge> InE (GValue<string> edgeLabel, params GValue<string>[] otherEdgeLabels) + { + if (otherEdgeLabels == null) throw new ArgumentNullException(nameof(otherEdgeLabels)); + + var args = new List<object?>(1 + otherEdgeLabels.Length) { edgeLabel }; + args.AddRange(otherEdgeLabels); + GremlinLang.AddStep("inE", args.ToArray()); + return Wrap<TStart, Edge>(this); + } + /// <summary> /// Adds the inV step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> @@ -1315,6 +1461,24 @@ namespace Gremlin.Net.Process.Traversal return Wrap<TStart, TNewEnd>(this); } + /// <summary> + /// Adds the limit step to this <see cref="GraphTraversal{SType, EType}" />. + /// </summary> + public GraphTraversal<TStart, TNewEnd> Limit<TNewEnd> (GValue<long> limit) + { + GremlinLang.AddStep("limit", limit); + return Wrap<TStart, TNewEnd>(this); + } + + /// <summary> + /// Adds the limit step to this <see cref="GraphTraversal{SType, EType}" />. + /// </summary> + public GraphTraversal<TStart, TNewEnd> Limit<TNewEnd> (Scope scope, GValue<long> limit) + { + GremlinLang.AddStep("limit", scope, limit); + return Wrap<TStart, TNewEnd>(this); + } + /// <summary> /// Adds the local step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> @@ -1469,6 +1633,15 @@ namespace Gremlin.Net.Process.Traversal return Wrap<TStart, Edge>(this); } + /// <summary> + /// Adds the mergeE step to this <see cref="GraphTraversal{SType, EType}" />. + /// </summary> + public GraphTraversal<TStart, Edge> MergeE (GValue<IDictionary<object,object>> m) + { + GremlinLang.AddStep("mergeE", m); + return Wrap<TStart, Edge>(this); + } + /// <summary> /// Adds the mergeE step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> @@ -1496,6 +1669,15 @@ namespace Gremlin.Net.Process.Traversal return Wrap<TStart, Vertex>(this); } + /// <summary> + /// Adds the mergeV step to this <see cref="GraphTraversal{SType, EType}" />. + /// </summary> + public GraphTraversal<TStart, Vertex> MergeV (GValue<IDictionary<object,object>> m) + { + GremlinLang.AddStep("mergeV", m); + return Wrap<TStart, Vertex>(this); + } + /// <summary> /// Adds the mergeV step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> @@ -1568,6 +1750,15 @@ namespace Gremlin.Net.Process.Traversal return Wrap<TStart, TEnd>(this); } + /// <summary> + /// Adds the option step to this <see cref="GraphTraversal{SType, EType}" />. + /// </summary> + public GraphTraversal<TStart, TEnd> Option (object pickToken, GValue<IDictionary<object,object>> m) + { + GremlinLang.AddStep("option", pickToken, m); + return Wrap<TStart, TEnd>(this); + } + /// <summary> /// Adds the option step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> @@ -1639,6 +1830,19 @@ namespace Gremlin.Net.Process.Traversal return Wrap<TStart, Vertex>(this); } + /// <summary> + /// Adds the out step to this <see cref="GraphTraversal{SType, EType}" />. + /// </summary> + public GraphTraversal<TStart, Vertex> Out (GValue<string> edgeLabel, params GValue<string>[] otherEdgeLabels) + { + if (otherEdgeLabels == null) throw new ArgumentNullException(nameof(otherEdgeLabels)); + + var args = new List<object?>(1 + otherEdgeLabels.Length) { edgeLabel }; + args.AddRange(otherEdgeLabels); + GremlinLang.AddStep("out", args.ToArray()); + return Wrap<TStart, Vertex>(this); + } + /// <summary> /// Adds the outE step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> @@ -1652,6 +1856,19 @@ namespace Gremlin.Net.Process.Traversal return Wrap<TStart, Edge>(this); } + /// <summary> + /// Adds the outE step to this <see cref="GraphTraversal{SType, EType}" />. + /// </summary> + public GraphTraversal<TStart, Edge> OutE (GValue<string> edgeLabel, params GValue<string>[] otherEdgeLabels) + { + if (otherEdgeLabels == null) throw new ArgumentNullException(nameof(otherEdgeLabels)); + + var args = new List<object?>(1 + otherEdgeLabels.Length) { edgeLabel }; + args.AddRange(otherEdgeLabels); + GremlinLang.AddStep("outE", args.ToArray()); + return Wrap<TStart, Edge>(this); + } + /// <summary> /// Adds the outV step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> @@ -1857,6 +2074,24 @@ namespace Gremlin.Net.Process.Traversal return Wrap<TStart, TNewEnd>(this); } + /// <summary> + /// Adds the range step to this <see cref="GraphTraversal{SType, EType}" />. + /// </summary> + public GraphTraversal<TStart, TNewEnd> Range<TNewEnd> (GValue<long> low, GValue<long> high) + { + GremlinLang.AddStep("range", low, high); + return Wrap<TStart, TNewEnd>(this); + } + + /// <summary> + /// Adds the range step to this <see cref="GraphTraversal{SType, EType}" />. + /// </summary> + public GraphTraversal<TStart, TNewEnd> Range<TNewEnd> (Scope scope, GValue<long> low, GValue<long> high) + { + GremlinLang.AddStep("range", scope, low, high); + return Wrap<TStart, TNewEnd>(this); + } + /// <summary> /// Adds the read step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> @@ -2092,6 +2327,24 @@ namespace Gremlin.Net.Process.Traversal return Wrap<TStart, TNewEnd>(this); } + /// <summary> + /// Adds the skip step to this <see cref="GraphTraversal{SType, EType}" />. + /// </summary> + public GraphTraversal<TStart, TNewEnd> Skip<TNewEnd> (GValue<long> skip) + { + GremlinLang.AddStep("skip", skip); + return Wrap<TStart, TNewEnd>(this); + } + + /// <summary> + /// Adds the skip step to this <see cref="GraphTraversal{SType, EType}" />. + /// </summary> + public GraphTraversal<TStart, TNewEnd> Skip<TNewEnd> (Scope scope, GValue<long> skip) + { + GremlinLang.AddStep("skip", scope, skip); + return Wrap<TStart, TNewEnd>(this); + } + /// <summary> /// Adds the split step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> @@ -2210,9 +2463,27 @@ namespace Gremlin.Net.Process.Traversal } /// <summary> - /// Adds the timeLimit step to this <see cref="GraphTraversal{SType, EType}" />. + /// Adds the tail step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal<TStart, TEnd> TimeLimit (long timeLimit) + public GraphTraversal<TStart, TNewEnd> Tail<TNewEnd> (GValue<long> limit) + { + GremlinLang.AddStep("tail", limit); + return Wrap<TStart, TNewEnd>(this); + } + + /// <summary> + /// Adds the tail step to this <see cref="GraphTraversal{SType, EType}" />. + /// </summary> + public GraphTraversal<TStart, TNewEnd> Tail<TNewEnd> (Scope scope, GValue<long> limit) + { + GremlinLang.AddStep("tail", scope, limit); + return Wrap<TStart, TNewEnd>(this); + } + + /// <summary> + /// Adds the timeLimit step to this <see cref="GraphTraversal{SType, EType}" />. + /// </summary> + public GraphTraversal<TStart, TEnd> TimeLimit (long timeLimit) { GremlinLang.AddStep("timeLimit", timeLimit); return Wrap<TStart, TEnd>(this); @@ -2239,6 +2510,19 @@ namespace Gremlin.Net.Process.Traversal GremlinLang.AddStep("to", args.ToArray()); return Wrap<TStart, Vertex>(this); } + + /// <summary> + /// Adds the to step to this <see cref="GraphTraversal{SType, EType}" />. + /// </summary> + public GraphTraversal<TStart, Vertex> To (Direction? direction, GValue<string> edgeLabel, params GValue<string>[] otherEdgeLabels) + { + if (otherEdgeLabels == null) throw new ArgumentNullException(nameof(otherEdgeLabels)); + + var args = new List<object?>(2 + otherEdgeLabels.Length) { direction, edgeLabel }; + args.AddRange(otherEdgeLabels); + GremlinLang.AddStep("to", args.ToArray()); + return Wrap<TStart, Vertex>(this); + } /// <summary> /// Adds the to step to this <see cref="GraphTraversal{SType, EType}" />. @@ -2277,6 +2561,15 @@ namespace Gremlin.Net.Process.Traversal return Wrap<TStart, TEnd>(this); } + /// <summary> + /// Adds the to step to this <see cref="GraphTraversal{SType, EType}" />. + /// </summary> + public GraphTraversal<TStart, TEnd> To (GValue<object> toVertex) + { + GremlinLang.AddStep("to", toVertex); + return Wrap<TStart, TEnd>(this); + } + /// <summary> /// Adds the toE step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> @@ -2289,6 +2582,19 @@ namespace Gremlin.Net.Process.Traversal GremlinLang.AddStep("toE", args.ToArray()); return Wrap<TStart, Edge>(this); } + + /// <summary> + /// Adds the toE step to this <see cref="GraphTraversal{SType, EType}" />. + /// </summary> + public GraphTraversal<TStart, Edge> ToE (Direction? direction, GValue<string> edgeLabel, params GValue<string>[] otherEdgeLabels) + { + if (otherEdgeLabels == null) throw new ArgumentNullException(nameof(otherEdgeLabels)); + + var args = new List<object?>(2 + otherEdgeLabels.Length) { direction, edgeLabel }; + args.AddRange(otherEdgeLabels); + GremlinLang.AddStep("toE", args.ToArray()); + return Wrap<TStart, Edge>(this); + } /// <summary> /// Adds the toLower step to this <see cref="GraphTraversal{SType, EType}" />. @@ -2514,313 +2820,6 @@ namespace Gremlin.Net.Process.Traversal return Wrap<TStart, TEnd>(this); } - - /// <summary> - /// Adds the constant step to this <see cref="GraphTraversal{SType, EType}" />. - /// </summary> - public GraphTraversal<TStart, TNewEnd> Constant<TNewEnd> (GValue<TNewEnd> e) - { - GremlinLang.AddStep("constant", e); - return Wrap<TStart, TNewEnd>(this); - } - - /// <summary> - /// Adds the to step to this <see cref="GraphTraversal{SType, EType}" />. - /// </summary> - public GraphTraversal<TStart, Vertex> To (Direction? direction, GValue<string> edgeLabel, params GValue<string>[] otherEdgeLabels) - { - if (otherEdgeLabels == null) throw new ArgumentNullException(nameof(otherEdgeLabels)); - - var args = new List<object?>(2 + otherEdgeLabels.Length) { direction, edgeLabel }; - args.AddRange(otherEdgeLabels); - GremlinLang.AddStep("to", args.ToArray()); - return Wrap<TStart, Vertex>(this); - } - - /// <summary> - /// Adds the out step to this <see cref="GraphTraversal{SType, EType}" />. - /// </summary> - public GraphTraversal<TStart, Vertex> Out (GValue<string> edgeLabel, params GValue<string>[] otherEdgeLabels) - { - if (otherEdgeLabels == null) throw new ArgumentNullException(nameof(otherEdgeLabels)); - - var args = new List<object?>(1 + otherEdgeLabels.Length) { edgeLabel }; - args.AddRange(otherEdgeLabels); - GremlinLang.AddStep("out", args.ToArray()); - return Wrap<TStart, Vertex>(this); - } - - /// <summary> - /// Adds the in step to this <see cref="GraphTraversal{SType, EType}" />. - /// </summary> - public GraphTraversal<TStart, Vertex> In (GValue<string> edgeLabel, params GValue<string>[] otherEdgeLabels) - { - if (otherEdgeLabels == null) throw new ArgumentNullException(nameof(otherEdgeLabels)); - - var args = new List<object?>(1 + otherEdgeLabels.Length) { edgeLabel }; - args.AddRange(otherEdgeLabels); - GremlinLang.AddStep("in", args.ToArray()); - return Wrap<TStart, Vertex>(this); - } - - /// <summary> - /// Adds the both step to this <see cref="GraphTraversal{SType, EType}" />. - /// </summary> - public GraphTraversal<TStart, Vertex> Both (GValue<string> edgeLabel, params GValue<string>[] otherEdgeLabels) - { - if (otherEdgeLabels == null) throw new ArgumentNullException(nameof(otherEdgeLabels)); - - var args = new List<object?>(1 + otherEdgeLabels.Length) { edgeLabel }; - args.AddRange(otherEdgeLabels); - GremlinLang.AddStep("both", args.ToArray()); - return Wrap<TStart, Vertex>(this); - } - - /// <summary> - /// Adds the outE step to this <see cref="GraphTraversal{SType, EType}" />. - /// </summary> - public GraphTraversal<TStart, Edge> OutE (GValue<string> edgeLabel, params GValue<string>[] otherEdgeLabels) - { - if (otherEdgeLabels == null) throw new ArgumentNullException(nameof(otherEdgeLabels)); - - var args = new List<object?>(1 + otherEdgeLabels.Length) { edgeLabel }; - args.AddRange(otherEdgeLabels); - GremlinLang.AddStep("outE", args.ToArray()); - return Wrap<TStart, Edge>(this); - } - - /// <summary> - /// Adds the inE step to this <see cref="GraphTraversal{SType, EType}" />. - /// </summary> - public GraphTraversal<TStart, Edge> InE (GValue<string> edgeLabel, params GValue<string>[] otherEdgeLabels) - { - if (otherEdgeLabels == null) throw new ArgumentNullException(nameof(otherEdgeLabels)); - - var args = new List<object?>(1 + otherEdgeLabels.Length) { edgeLabel }; - args.AddRange(otherEdgeLabels); - GremlinLang.AddStep("inE", args.ToArray()); - return Wrap<TStart, Edge>(this); - } - - /// <summary> - /// Adds the bothE step to this <see cref="GraphTraversal{SType, EType}" />. - /// </summary> - public GraphTraversal<TStart, Edge> BothE (GValue<string> edgeLabel, params GValue<string>[] otherEdgeLabels) - { - if (otherEdgeLabels == null) throw new ArgumentNullException(nameof(otherEdgeLabels)); - - var args = new List<object?>(1 + otherEdgeLabels.Length) { edgeLabel }; - args.AddRange(otherEdgeLabels); - GremlinLang.AddStep("bothE", args.ToArray()); - return Wrap<TStart, Edge>(this); - } - - /// <summary> - /// Adds the toE step to this <see cref="GraphTraversal{SType, EType}" />. - /// </summary> - public GraphTraversal<TStart, Edge> ToE (Direction? direction, GValue<string> edgeLabel, params GValue<string>[] otherEdgeLabels) - { - if (otherEdgeLabels == null) throw new ArgumentNullException(nameof(otherEdgeLabels)); - - var args = new List<object?>(2 + otherEdgeLabels.Length) { direction, edgeLabel }; - args.AddRange(otherEdgeLabels); - GremlinLang.AddStep("toE", args.ToArray()); - return Wrap<TStart, Edge>(this); - } - - /// <summary> - /// Adds the addV step to this <see cref="GraphTraversal{SType, EType}" />. - /// </summary> - public GraphTraversal<TStart, Vertex> AddV (GValue<string> vertexLabel) - { - GremlinLang.AddStep("addV", vertexLabel); - return Wrap<TStart, Vertex>(this); - } - - /// <summary> - /// Adds the mergeV step to this <see cref="GraphTraversal{SType, EType}" />. - /// </summary> - public GraphTraversal<TStart, Vertex> MergeV (GValue<IDictionary<object,object>> m) - { - GremlinLang.AddStep("mergeV", m); - return Wrap<TStart, Vertex>(this); - } - - /// <summary> - /// Adds the mergeE step to this <see cref="GraphTraversal{SType, EType}" />. - /// </summary> - public GraphTraversal<TStart, Edge> MergeE (GValue<IDictionary<object,object>> m) - { - GremlinLang.AddStep("mergeE", m); - return Wrap<TStart, Edge>(this); - } - - /// <summary> - /// Adds the addE step to this <see cref="GraphTraversal{SType, EType}" />. - /// </summary> - public GraphTraversal<TStart, Edge> AddE (GValue<string> edgeLabel) - { - GremlinLang.AddStep("addE", edgeLabel); - return Wrap<TStart, Edge>(this); - } - - /// <summary> - /// Adds the from step to this <see cref="GraphTraversal{SType, EType}" />. - /// </summary> - public GraphTraversal<TStart, TEnd> From (GValue<object> fromVertex) - { - GremlinLang.AddStep("from", fromVertex); - return Wrap<TStart, TEnd>(this); - } - - /// <summary> - /// Adds the to step to this <see cref="GraphTraversal{SType, EType}" />. - /// </summary> - public GraphTraversal<TStart, TEnd> To (GValue<object> toVertex) - { - GremlinLang.AddStep("to", toVertex); - return Wrap<TStart, TEnd>(this); - } - - /// <summary> - /// Adds the call step to this <see cref="GraphTraversal{SType, EType}" />. - /// </summary> - public GraphTraversal<TStart, TNewEnd> Call<TNewEnd> (string? service, GValue<IDictionary<object,object>> m) - { - GremlinLang.AddStep("call", service, m); - return Wrap<TStart, TNewEnd>(this); - } - - /// <summary> - /// Adds the call step to this <see cref="GraphTraversal{SType, EType}" />. - /// </summary> - public GraphTraversal<TStart, TNewEnd> Call<TNewEnd> (string? service, GValue<IDictionary<object,object>> m, ITraversal childTraversal) - { - GremlinLang.AddStep("call", service, m, childTraversal); - return Wrap<TStart, TNewEnd>(this); - } - - /// <summary> - /// Adds the has step to this <see cref="GraphTraversal{SType, EType}" />. - /// </summary> - public GraphTraversal<TStart, TEnd> Has (GValue<string> label, string? propertyKey, object? value) - { - GremlinLang.AddStep("has", label, propertyKey, value); - return Wrap<TStart, TEnd>(this); - } - - /// <summary> - /// Adds the has step to this <see cref="GraphTraversal{SType, EType}" />. - /// </summary> - public GraphTraversal<TStart, TEnd> Has (GValue<string> label, string? propertyKey, P? predicate) - { - GremlinLang.AddStep("has", label, propertyKey, predicate); - return Wrap<TStart, TEnd>(this); - } - - /// <summary> - /// Adds the hasLabel step to this <see cref="GraphTraversal{SType, EType}" />. - /// </summary> - public GraphTraversal<TStart, TEnd> HasLabel (GValue<string> label, params GValue<string>[] otherLabels) - { - if (otherLabels == null) throw new ArgumentNullException(nameof(otherLabels)); - - var args = new List<object?>(1 + otherLabels.Length) { label }; - args.AddRange(otherLabels); - GremlinLang.AddStep("hasLabel", args.ToArray()); - return Wrap<TStart, TEnd>(this); - } - - /// <summary> - /// Adds the coin step to this <see cref="GraphTraversal{SType, EType}" />. - /// </summary> - public GraphTraversal<TStart, TEnd> Coin (GValue<double> probability) - { - GremlinLang.AddStep("coin", probability); - return Wrap<TStart, TEnd>(this); - } - - /// <summary> - /// Adds the range step to this <see cref="GraphTraversal{SType, EType}" />. - /// </summary> - public GraphTraversal<TStart, TNewEnd> Range<TNewEnd> (GValue<long> low, GValue<long> high) - { - GremlinLang.AddStep("range", low, high); - return Wrap<TStart, TNewEnd>(this); - } - - /// <summary> - /// Adds the range step to this <see cref="GraphTraversal{SType, EType}" />. - /// </summary> - public GraphTraversal<TStart, TNewEnd> Range<TNewEnd> (Scope scope, GValue<long> low, GValue<long> high) - { - GremlinLang.AddStep("range", scope, low, high); - return Wrap<TStart, TNewEnd>(this); - } - - /// <summary> - /// Adds the limit step to this <see cref="GraphTraversal{SType, EType}" />. - /// </summary> - public GraphTraversal<TStart, TNewEnd> Limit<TNewEnd> (GValue<long> limit) - { - GremlinLang.AddStep("limit", limit); - return Wrap<TStart, TNewEnd>(this); - } - - /// <summary> - /// Adds the limit step to this <see cref="GraphTraversal{SType, EType}" />. - /// </summary> - public GraphTraversal<TStart, TNewEnd> Limit<TNewEnd> (Scope scope, GValue<long> limit) - { - GremlinLang.AddStep("limit", scope, limit); - return Wrap<TStart, TNewEnd>(this); - } - - /// <summary> - /// Adds the tail step to this <see cref="GraphTraversal{SType, EType}" />. - /// </summary> - public GraphTraversal<TStart, TNewEnd> Tail<TNewEnd> (GValue<long> limit) - { - GremlinLang.AddStep("tail", limit); - return Wrap<TStart, TNewEnd>(this); - } - - /// <summary> - /// Adds the tail step to this <see cref="GraphTraversal{SType, EType}" />. - /// </summary> - public GraphTraversal<TStart, TNewEnd> Tail<TNewEnd> (Scope scope, GValue<long> limit) - { - GremlinLang.AddStep("tail", scope, limit); - return Wrap<TStart, TNewEnd>(this); - } - - /// <summary> - /// Adds the skip step to this <see cref="GraphTraversal{SType, EType}" />. - /// </summary> - public GraphTraversal<TStart, TNewEnd> Skip<TNewEnd> (GValue<long> skip) - { - GremlinLang.AddStep("skip", skip); - return Wrap<TStart, TNewEnd>(this); - } - - /// <summary> - /// Adds the skip step to this <see cref="GraphTraversal{SType, EType}" />. - /// </summary> - public GraphTraversal<TStart, TNewEnd> Skip<TNewEnd> (Scope scope, GValue<long> skip) - { - GremlinLang.AddStep("skip", scope, skip); - return Wrap<TStart, TNewEnd>(this); - } - - /// <summary> - /// Adds the option step to this <see cref="GraphTraversal{SType, EType}" />. - /// </summary> - public GraphTraversal<TStart, TEnd> Option (object pickToken, GValue<IDictionary<object,object>> m) - { - GremlinLang.AddStep("option", pickToken, m); - return Wrap<TStart, TEnd>(this); - } - /// <summary> /// Make a copy of a traversal that is reset for iteration. /// </summary> @@ -2829,4 +2828,4 @@ namespace Gremlin.Net.Process.Traversal return new GraphTraversal<TStart, TEnd>(TraversalStrategies, GremlinLang.Clone()); } } -} \ No newline at end of file +} diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/__.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/__.cs index 870006e28b..484b393c19 100644 --- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/__.cs +++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/__.cs @@ -68,6 +68,14 @@ namespace Gremlin.Net.Process.Traversal return new GraphTraversal<object, Edge>().AddE(edgeLabel); } + /// <summary> + /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the addE step to that traversal. + /// </summary> + public static GraphTraversal<object, Edge> AddE(GValue<string> edgeLabel) + { + return new GraphTraversal<object, Edge>().AddE(edgeLabel); + } + /// <summary> /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the addE step to that traversal. /// </summary> @@ -92,6 +100,14 @@ namespace Gremlin.Net.Process.Traversal return new GraphTraversal<object, Vertex>().AddV(vertexLabel); } + /// <summary> + /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the addV step to that traversal. + /// </summary> + public static GraphTraversal<object, Vertex> AddV(GValue<string> vertexLabel) + { + return new GraphTraversal<object, Vertex>().AddV(vertexLabel); + } + /// <summary> /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the addV step to that traversal. /// </summary> @@ -210,6 +226,14 @@ namespace Gremlin.Net.Process.Traversal : new GraphTraversal<object, Vertex>().Both(edgeLabels); } + /// <summary> + /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the both step to that traversal. + /// </summary> + public static GraphTraversal<object, Vertex> Both(GValue<string> edgeLabel, params GValue<string>[] otherEdgeLabels) + { + return new GraphTraversal<object, Vertex>().Both(edgeLabel, otherEdgeLabels); + } + /// <summary> /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the bothE step to that traversal. /// </summary> @@ -220,6 +244,14 @@ namespace Gremlin.Net.Process.Traversal : new GraphTraversal<object, Edge>().BothE(edgeLabels); } + /// <summary> + /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the bothE step to that traversal. + /// </summary> + public static GraphTraversal<object, Edge> BothE(GValue<string> edgeLabel, params GValue<string>[] otherEdgeLabels) + { + return new GraphTraversal<object, Edge>().BothE(edgeLabel, otherEdgeLabels); + } + /// <summary> /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the bothV step to that traversal. /// </summary> @@ -276,6 +308,22 @@ namespace Gremlin.Net.Process.Traversal return new GraphTraversal<object, E2>().Call<E2>(service, m, t); } + /// <summary> + /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the call step to that traversal. + /// </summary> + public static GraphTraversal<object, E2> Call<E2>(string service, GValue<IDictionary<object, object>> m) + { + return new GraphTraversal<object, E2>().Call<E2>(service, m); + } + + /// <summary> + /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the call step to that traversal. + /// </summary> + public static GraphTraversal<object, E2> Call<E2>(string service, GValue<IDictionary<object, object>> m, ITraversal childTraversal) + { + return new GraphTraversal<object, E2>().Call<E2>(service, m, childTraversal); + } + /// <summary> /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the cap step to that traversal. /// </summary> @@ -352,6 +400,14 @@ namespace Gremlin.Net.Process.Traversal return new GraphTraversal<object, object>().Coin(probability); } + /// <summary> + /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the coin step to that traversal. + /// </summary> + public static GraphTraversal<object, object> Coin(GValue<double> probability) + { + return new GraphTraversal<object, object>().Coin(probability); + } + /// <summary> /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the combine step to that traversal. /// </summary> @@ -394,6 +450,14 @@ namespace Gremlin.Net.Process.Traversal return new GraphTraversal<object, E2>().Constant(a); } + /// <summary> + /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the constant step to that traversal. + /// </summary> + public static GraphTraversal<object, E2> Constant<E2>(GValue<E2> a) + { + return new GraphTraversal<object, E2>().Constant(a); + } + /// <summary> /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the count step to that traversal. /// </summary> @@ -712,6 +776,22 @@ namespace Gremlin.Net.Process.Traversal return new GraphTraversal<object, object>().Has(accessor, predicate); } + /// <summary> + /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the has step to that traversal. + /// </summary> + public static GraphTraversal<object, object> Has(GValue<string> label, string propertyKey, P predicate) + { + return new GraphTraversal<object, object>().Has(label, propertyKey, predicate); + } + + /// <summary> + /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the has step to that traversal. + /// </summary> + public static GraphTraversal<object, object> Has(GValue<string> label, string propertyKey, object value) + { + return new GraphTraversal<object, object>().Has(label, propertyKey, value); + } + /// <summary> /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the hasId step to that traversal. /// </summary> @@ -766,6 +846,14 @@ namespace Gremlin.Net.Process.Traversal : new GraphTraversal<object, object>().HasLabel(label, otherLabels); } + /// <summary> + /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the hasLabel step to that traversal. + /// </summary> + public static GraphTraversal<object, object> HasLabel(GValue<string> label, params GValue<string>[] otherLabels) + { + return new GraphTraversal<object, object>().HasLabel(label, otherLabels); + } + /// <summary> /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the hasNot step to that traversal. /// </summary> @@ -818,6 +906,14 @@ namespace Gremlin.Net.Process.Traversal : new GraphTraversal<object, Vertex>().In(edgeLabels); } + /// <summary> + /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the in step to that traversal. + /// </summary> + public static GraphTraversal<object, Vertex> In(GValue<string> edgeLabel, params GValue<string>[] otherEdgeLabels) + { + return new GraphTraversal<object, Vertex>().In(edgeLabel, otherEdgeLabels); + } + /// <summary> /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the inE step to that traversal. /// </summary> @@ -828,6 +924,14 @@ namespace Gremlin.Net.Process.Traversal : new GraphTraversal<object, Edge>().InE(edgeLabels); } + /// <summary> + /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the inE step to that traversal. + /// </summary> + public static GraphTraversal<object, Edge> InE(GValue<string> edgeLabel, params GValue<string>[] otherEdgeLabels) + { + return new GraphTraversal<object, Edge>().InE(edgeLabel, otherEdgeLabels); + } + /// <summary> /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the inV step to that traversal. /// </summary> @@ -918,6 +1022,14 @@ namespace Gremlin.Net.Process.Traversal return new GraphTraversal<object, E2>().Limit<E2>(scope, limit); } + /// <summary> + /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the limit step to that traversal. + /// </summary> + public static GraphTraversal<object, E2> Limit<E2>(Scope scope, GValue<long> limit) + { + return new GraphTraversal<object, E2>().Limit<E2>(scope, limit); + } + /// <summary> /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the limit step to that traversal. /// </summary> @@ -926,6 +1038,14 @@ namespace Gremlin.Net.Process.Traversal return new GraphTraversal<object, E2>().Limit<E2>(limit); } + /// <summary> + /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the limit step to that traversal. + /// </summary> + public static GraphTraversal<object, E2> Limit<E2>(GValue<long> limit) + { + return new GraphTraversal<object, E2>().Limit<E2>(limit); + } + /// <summary> /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the local step to that traversal. /// </summary> @@ -1056,6 +1176,14 @@ namespace Gremlin.Net.Process.Traversal return new GraphTraversal<object, Edge>().MergeE(m); } + /// <summary> + /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the mergeE step to that traversal. + /// </summary> + public static GraphTraversal<object, Edge> MergeE(GValue<IDictionary<object, object>> m) + { + return new GraphTraversal<object, Edge>().MergeE(m); + } + /// <summary> /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the mergeE step to that traversal. /// </summary> @@ -1080,6 +1208,14 @@ namespace Gremlin.Net.Process.Traversal return new GraphTraversal<object, Vertex>().MergeV(m); } + /// <summary> + /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the mergeV step to that traversal. + /// </summary> + public static GraphTraversal<object, Vertex> MergeV(GValue<IDictionary<object, object>> m) + { + return new GraphTraversal<object, Vertex>().MergeV(m); + } + /// <summary> /// Adds the mergeV step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> @@ -1172,6 +1308,14 @@ namespace Gremlin.Net.Process.Traversal : new GraphTraversal<object, Vertex>().Out(edgeLabels); } + /// <summary> + /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the out step to that traversal. + /// </summary> + public static GraphTraversal<object, Vertex> Out(GValue<string> edgeLabel, params GValue<string>[] otherEdgeLabels) + { + return new GraphTraversal<object, Vertex>().Out(edgeLabel, otherEdgeLabels); + } + /// <summary> /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the outE step to that traversal. /// </summary> @@ -1182,6 +1326,14 @@ namespace Gremlin.Net.Process.Traversal : new GraphTraversal<object, Edge>().OutE(edgeLabels); } + /// <summary> + /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the outE step to that traversal. + /// </summary> + public static GraphTraversal<object, Edge> OutE(GValue<string> edgeLabel, params GValue<string>[] otherEdgeLabels) + { + return new GraphTraversal<object, Edge>().OutE(edgeLabel, otherEdgeLabels); + } + /// <summary> /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the outV step to that traversal. /// </summary> @@ -1274,6 +1426,14 @@ namespace Gremlin.Net.Process.Traversal return new GraphTraversal<object, E2>().Range<E2>(scope, low, high); } + /// <summary> + /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the range step to that traversal. + /// </summary> + public static GraphTraversal<object, E2> Range<E2>(Scope scope, GValue<long> low, GValue<long> high) + { + return new GraphTraversal<object, E2>().Range<E2>(scope, low, high); + } + /// <summary> /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the range step to that traversal. /// </summary> @@ -1282,6 +1442,14 @@ namespace Gremlin.Net.Process.Traversal return new GraphTraversal<object, E2>().Range<E2>(low, high); } + /// <summary> + /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the range step to that traversal. + /// </summary> + public static GraphTraversal<object, E2> Range<E2>(GValue<long> low, GValue<long> high) + { + return new GraphTraversal<object, E2>().Range<E2>(low, high); + } + /// <summary> /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the repeat step to that traversal. /// </summary> @@ -1458,6 +1626,14 @@ namespace Gremlin.Net.Process.Traversal return new GraphTraversal<object, E2>().Skip<E2>(scope, skip); } + /// <summary> + /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the skip step to that traversal. + /// </summary> + public static GraphTraversal<object, E2> Skip<E2>(Scope scope, GValue<long> skip) + { + return new GraphTraversal<object, E2>().Skip<E2>(scope, skip); + } + /// <summary> /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the skip step to that traversal. /// </summary> @@ -1466,6 +1642,14 @@ namespace Gremlin.Net.Process.Traversal return new GraphTraversal<object, E2>().Skip<E2>(skip); } + /// <summary> + /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the skip step to that traversal. + /// </summary> + public static GraphTraversal<object, E2> Skip<E2>(GValue<long> skip) + { + return new GraphTraversal<object, E2>().Skip<E2>(skip); + } + /// <summary> /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the split step to that traversal. /// </summary> @@ -1546,6 +1730,14 @@ namespace Gremlin.Net.Process.Traversal return new GraphTraversal<object, E2>().Tail<E2>(scope, limit); } + /// <summary> + /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the tail step to that traversal. + /// </summary> + public static GraphTraversal<object, E2> Tail<E2>(Scope scope, GValue<long> limit) + { + return new GraphTraversal<object, E2>().Tail<E2>(scope, limit); + } + /// <summary> /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the tail step to that traversal. /// </summary> @@ -1554,6 +1746,14 @@ namespace Gremlin.Net.Process.Traversal return new GraphTraversal<object, E2>().Tail<E2>(limit); } + /// <summary> + /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the tail step to that traversal. + /// </summary> + public static GraphTraversal<object, E2> Tail<E2>(GValue<long> limit) + { + return new GraphTraversal<object, E2>().Tail<E2>(limit); + } + /// <summary> /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the timeLimit step to that traversal. /// </summary> @@ -1580,6 +1780,14 @@ namespace Gremlin.Net.Process.Traversal : new GraphTraversal<object, Vertex>().To(direction, edgeLabels); } + /// <summary> + /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the to step to that traversal. + /// </summary> + public static GraphTraversal<object, Vertex> To(Direction? direction, GValue<string> edgeLabel, params GValue<string>[] otherEdgeLabels) + { + return new GraphTraversal<object, Vertex>().To(direction, edgeLabel, otherEdgeLabels); + } + /// <summary> /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the toE step to that traversal. /// </summary> @@ -1589,6 +1797,14 @@ namespace Gremlin.Net.Process.Traversal ? new GraphTraversal<object, Edge>().ToE(direction) : new GraphTraversal<object, Edge>().ToE(direction, edgeLabels); } + + /// <summary> + /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the toE step to that traversal. + /// </summary> + public static GraphTraversal<object, Edge> ToE(Direction? direction, GValue<string> edgeLabel, params GValue<string>[] otherEdgeLabels) + { + return new GraphTraversal<object, Edge>().ToE(direction, edgeLabel, otherEdgeLabels); + } /// <summary> /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the toLower step to that traversal. @@ -1760,221 +1976,5 @@ namespace Gremlin.Net.Process.Traversal return new GraphTraversal<object, object>().Where(whereTraversal); } - /// <summary> - /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the constant step to that traversal. - /// </summary> - public static GraphTraversal<object, E2> Constant<E2>(GValue<E2> a) - { - return new GraphTraversal<object, E2>().Constant(a); - } - - /// <summary> - /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the to step to that traversal. - /// </summary> - public static GraphTraversal<object, Vertex> To(Direction? direction, GValue<string> edgeLabel, params GValue<string>[] otherEdgeLabels) - { - return new GraphTraversal<object, Vertex>().To(direction, edgeLabel, otherEdgeLabels); - } - - /// <summary> - /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the out step to that traversal. - /// </summary> - public static GraphTraversal<object, Vertex> Out(GValue<string> edgeLabel, params GValue<string>[] otherEdgeLabels) - { - return new GraphTraversal<object, Vertex>().Out(edgeLabel, otherEdgeLabels); - } - - /// <summary> - /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the in step to that traversal. - /// </summary> - public static GraphTraversal<object, Vertex> In(GValue<string> edgeLabel, params GValue<string>[] otherEdgeLabels) - { - return new GraphTraversal<object, Vertex>().In(edgeLabel, otherEdgeLabels); - } - - /// <summary> - /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the both step to that traversal. - /// </summary> - public static GraphTraversal<object, Vertex> Both(GValue<string> edgeLabel, params GValue<string>[] otherEdgeLabels) - { - return new GraphTraversal<object, Vertex>().Both(edgeLabel, otherEdgeLabels); - } - - /// <summary> - /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the toE step to that traversal. - /// </summary> - public static GraphTraversal<object, Edge> ToE(Direction? direction, GValue<string> edgeLabel, params GValue<string>[] otherEdgeLabels) - { - return new GraphTraversal<object, Edge>().ToE(direction, edgeLabel, otherEdgeLabels); - } - - /// <summary> - /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the outE step to that traversal. - /// </summary> - public static GraphTraversal<object, Edge> OutE(GValue<string> edgeLabel, params GValue<string>[] otherEdgeLabels) - { - return new GraphTraversal<object, Edge>().OutE(edgeLabel, otherEdgeLabels); - } - - /// <summary> - /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the inE step to that traversal. - /// </summary> - public static GraphTraversal<object, Edge> InE(GValue<string> edgeLabel, params GValue<string>[] otherEdgeLabels) - { - return new GraphTraversal<object, Edge>().InE(edgeLabel, otherEdgeLabels); - } - - /// <summary> - /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the bothE step to that traversal. - /// </summary> - public static GraphTraversal<object, Edge> BothE(GValue<string> edgeLabel, params GValue<string>[] otherEdgeLabels) - { - return new GraphTraversal<object, Edge>().BothE(edgeLabel, otherEdgeLabels); - } - - /// <summary> - /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the addV step to that traversal. - /// </summary> - public static GraphTraversal<object, Vertex> AddV(GValue<string> vertexLabel) - { - return new GraphTraversal<object, Vertex>().AddV(vertexLabel); - } - - /// <summary> - /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the mergeV step to that traversal. - /// </summary> - public static GraphTraversal<object, Vertex> MergeV(GValue<IDictionary<object, object>> m) - { - return new GraphTraversal<object, Vertex>().MergeV(m); - } - - /// <summary> - /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the addE step to that traversal. - /// </summary> - public static GraphTraversal<object, Edge> AddE(GValue<string> edgeLabel) - { - return new GraphTraversal<object, Edge>().AddE(edgeLabel); - } - - /// <summary> - /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the mergeE step to that traversal. - /// </summary> - public static GraphTraversal<object, Edge> MergeE(GValue<IDictionary<object, object>> m) - { - return new GraphTraversal<object, Edge>().MergeE(m); - } - - /// <summary> - /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the has step to that traversal. - /// </summary> - public static GraphTraversal<object, object> Has(GValue<string> label, string propertyKey, P predicate) - { - return new GraphTraversal<object, object>().Has(label, propertyKey, predicate); - } - - /// <summary> - /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the has step to that traversal. - /// </summary> - public static GraphTraversal<object, object> Has(GValue<string> label, string propertyKey, object value) - { - return new GraphTraversal<object, object>().Has(label, propertyKey, value); - } - - /// <summary> - /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the hasLabel step to that traversal. - /// </summary> - public static GraphTraversal<object, object> HasLabel(GValue<string> label, params GValue<string>[] otherLabels) - { - return new GraphTraversal<object, object>().HasLabel(label, otherLabels); - } - - /// <summary> - /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the coin step to that traversal. - /// </summary> - public static GraphTraversal<object, object> Coin(GValue<double> probability) - { - return new GraphTraversal<object, object>().Coin(probability); - } - - /// <summary> - /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the range step to that traversal. - /// </summary> - public static GraphTraversal<object, E2> Range<E2>(GValue<long> low, GValue<long> high) - { - return new GraphTraversal<object, E2>().Range<E2>(low, high); - } - - /// <summary> - /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the range step to that traversal. - /// </summary> - public static GraphTraversal<object, E2> Range<E2>(Scope scope, GValue<long> low, GValue<long> high) - { - return new GraphTraversal<object, E2>().Range<E2>(scope, low, high); - } - - /// <summary> - /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the limit step to that traversal. - /// </summary> - public static GraphTraversal<object, E2> Limit<E2>(GValue<long> limit) - { - return new GraphTraversal<object, E2>().Limit<E2>(limit); - } - - /// <summary> - /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the limit step to that traversal. - /// </summary> - public static GraphTraversal<object, E2> Limit<E2>(Scope scope, GValue<long> limit) - { - return new GraphTraversal<object, E2>().Limit<E2>(scope, limit); - } - - /// <summary> - /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the skip step to that traversal. - /// </summary> - public static GraphTraversal<object, E2> Skip<E2>(GValue<long> skip) - { - return new GraphTraversal<object, E2>().Skip<E2>(skip); - } - - /// <summary> - /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the skip step to that traversal. - /// </summary> - public static GraphTraversal<object, E2> Skip<E2>(Scope scope, GValue<long> skip) - { - return new GraphTraversal<object, E2>().Skip<E2>(scope, skip); - } - - /// <summary> - /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the tail step to that traversal. - /// </summary> - public static GraphTraversal<object, E2> Tail<E2>(GValue<long> limit) - { - return new GraphTraversal<object, E2>().Tail<E2>(limit); - } - - /// <summary> - /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the tail step to that traversal. - /// </summary> - public static GraphTraversal<object, E2> Tail<E2>(Scope scope, GValue<long> limit) - { - return new GraphTraversal<object, E2>().Tail<E2>(scope, limit); - } - - /// <summary> - /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the call step to that traversal. - /// </summary> - public static GraphTraversal<object, E2> Call<E2>(string service, GValue<IDictionary<object, object>> m) - { - return new GraphTraversal<object, E2>().Call<E2>(service, m); - } - - /// <summary> - /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the call step to that traversal. - /// </summary> - public static GraphTraversal<object, E2> Call<E2>(string service, GValue<IDictionary<object, object>> m, ITraversal childTraversal) - { - return new GraphTraversal<object, E2>().Call<E2>(service, m, childTraversal); - } - } -} \ No newline at end of file +}
