Make order of generated steps deterministic again
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/8a16d4b3 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/8a16d4b3 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/8a16d4b3 Branch: refs/heads/TINKERPOP-1752 Commit: 8a16d4b3eae9e0881d12ee1d4ed5c2ef906701ad Parents: 706294d Author: florianhockmann <[email protected]> Authored: Sun Sep 3 15:36:13 2017 +0200 Committer: florianhockmann <[email protected]> Committed: Tue Sep 12 16:39:37 2017 +0200 ---------------------------------------------------------------------- gremlin-dotnet/pom.xml | 17 +- .../Process/Traversal/GraphTraversal.cs | 354 +++++++++---------- .../Process/Traversal/GraphTraversalSource.cs | 48 +-- .../src/Gremlin.Net/Process/Traversal/__.cs | 262 +++++++------- 4 files changed, 345 insertions(+), 336 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8a16d4b3/gremlin-dotnet/pom.xml ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/pom.xml b/gremlin-dotnet/pom.xml index ffc5c13..783a358 100644 --- a/gremlin-dotnet/pom.xml +++ b/gremlin-dotnet/pom.xml @@ -176,6 +176,15 @@ def toCSharpParamString = { param -> "${csharpParamTypeName} ${param.name}" } +def getJavaParamTypeString = { method -> + def parameters = method.parameters; + if (parameters.length == 0) + return "" + return parameters.collect { param -> + param.type.simpleName + }.join(",") +} + def getCSharpParamString = { method -> def parameters = method.parameters; if (parameters.length == 0) @@ -250,7 +259,7 @@ def binding = ["pmethods": P.class.getMethods(). !it.name.equals(TraversalSource.Symbols.withRemote) && !it.name.equals(TraversalSource.Symbols.withComputer) }. - sort { a, b -> a.name <=> b.name }. + sort { a, b -> a.name <=> b.name ?: getJavaParamTypeString(a) <=> getJavaParamTypeString(b) }. collect { javaMethod -> def parameters = getCSharpParamString(javaMethod) def paramNames = getParamNames(javaMethod.parameters).join(", ") @@ -258,7 +267,7 @@ def binding = ["pmethods": P.class.getMethods(). }, "sourceSpawnMethods": GraphTraversalSource.getMethods(). // SPAWN STEPS findAll { GraphTraversal.class.equals(it.returnType) && !it.name.equals('inject')}. - sort { a, b -> a.name <=> b.name }. + sort { a, b -> a.name <=> b.name ?: getJavaParamTypeString(a) <=> getJavaParamTypeString(b) }. collect { javaMethod -> def typeArguments = javaMethod.genericReturnType.actualTypeArguments.collect{t -> ((java.lang.Class)t).simpleName} def parameters = getCSharpParamString(javaMethod) @@ -268,7 +277,7 @@ def binding = ["pmethods": P.class.getMethods(). "graphStepMethods": GraphTraversal.getMethods(). findAll { GraphTraversal.class.equals(it.returnType) }. findAll { !it.name.equals("clone") && !it.name.equals("iterate") }. - sort { a, b -> a.name <=> b.name }. + sort { a, b -> a.name <=> b.name ?: getJavaParamTypeString(a) <=> getJavaParamTypeString(b) }. collect { javaMethod -> def typeNames = getJavaGenericTypeParameterTypeNames(javaMethod) def t1 = toCSharpType(typeNames[0]) @@ -282,7 +291,7 @@ def binding = ["pmethods": P.class.getMethods(). findAll { GraphTraversal.class.equals(it.returnType) }. findAll { Modifier.isStatic(it.getModifiers()) }. findAll { !it.name.equals("__") && !it.name.equals("start") }. - sort { it.name }. + sort { a, b -> a.name <=> b.name ?: getJavaParamTypeString(a) <=> getJavaParamTypeString(b) }. collect { javaMethod -> def typeNames = getJavaGenericTypeParameterTypeNames(javaMethod) def t2 = toCSharpType(typeNames[1]) http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8a16d4b3/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs index 45e271d..b702069 100644 --- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs +++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs @@ -75,9 +75,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the addE step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , Edge > AddE (string edgeLabel) + public GraphTraversal< S , Edge > AddE (Direction direction, string firstVertexKeyOrEdgeLabel, string edgeLabelOrSecondVertexKey, params object[] propertyKeyValues) { - var args = new List<object> { edgeLabel }; + var args = new List<object> { direction, firstVertexKeyOrEdgeLabel, edgeLabelOrSecondVertexKey, propertyKeyValues }; Bytecode.AddStep("addE", args); return Wrap< S , Edge >(this); } @@ -85,9 +85,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the addE step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , Edge > AddE (Direction direction, string firstVertexKeyOrEdgeLabel, string edgeLabelOrSecondVertexKey, params object[] propertyKeyValues) + public GraphTraversal< S , Edge > AddE (string edgeLabel) { - var args = new List<object> { direction, firstVertexKeyOrEdgeLabel, edgeLabelOrSecondVertexKey, propertyKeyValues }; + var args = new List<object> { edgeLabel }; Bytecode.AddStep("addE", args); return Wrap< S , Edge >(this); } @@ -115,9 +115,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the addV step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , Vertex > AddV (params object[] propertyKeyValues) + public GraphTraversal< S , Vertex > AddV () { - var args = new List<object> { propertyKeyValues }; + var args = new List<object> { }; Bytecode.AddStep("addV", args); return Wrap< S , Vertex >(this); } @@ -125,9 +125,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the addV step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , Vertex > AddV () + public GraphTraversal< S , Vertex > AddV (params object[] propertyKeyValues) { - var args = new List<object> { }; + var args = new List<object> { propertyKeyValues }; Bytecode.AddStep("addV", args); return Wrap< S , Vertex >(this); } @@ -255,9 +255,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the by step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > By (ITraversal traversal) + public GraphTraversal< S , E > By () { - var args = new List<object> { traversal }; + var args = new List<object> { }; Bytecode.AddStep("by", args); return Wrap< S , E >(this); } @@ -265,9 +265,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the by step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > By () + public GraphTraversal< S , E > By (object comparator) { - var args = new List<object> { }; + var args = new List<object> { comparator }; Bytecode.AddStep("by", args); return Wrap< S , E >(this); } @@ -275,9 +275,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the by step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > By (T token) + public GraphTraversal< S , E > By (object function) { - var args = new List<object> { token }; + var args = new List<object> { function }; Bytecode.AddStep("by", args); return Wrap< S , E >(this); } @@ -285,9 +285,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the by step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > By (string key) + public GraphTraversal< S , E > By (object function, object comparator) { - var args = new List<object> { key }; + var args = new List<object> { function, comparator }; Bytecode.AddStep("by", args); return Wrap< S , E >(this); } @@ -305,9 +305,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the by step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > By (object function, object comparator) + public GraphTraversal< S , E > By (string key) { - var args = new List<object> { function, comparator }; + var args = new List<object> { key }; Bytecode.AddStep("by", args); return Wrap< S , E >(this); } @@ -315,9 +315,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the by step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > By (object comparator) + public GraphTraversal< S , E > By (string key, object comparator) { - var args = new List<object> { comparator }; + var args = new List<object> { key, comparator }; Bytecode.AddStep("by", args); return Wrap< S , E >(this); } @@ -325,9 +325,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the by step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > By (object function) + public GraphTraversal< S , E > By (T token) { - var args = new List<object> { function }; + var args = new List<object> { token }; Bytecode.AddStep("by", args); return Wrap< S , E >(this); } @@ -335,9 +335,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the by step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > By (ITraversal traversal, object comparator) + public GraphTraversal< S , E > By (ITraversal traversal) { - var args = new List<object> { traversal, comparator }; + var args = new List<object> { traversal }; Bytecode.AddStep("by", args); return Wrap< S , E >(this); } @@ -345,9 +345,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the by step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > By (string key, object comparator) + public GraphTraversal< S , E > By (ITraversal traversal, object comparator) { - var args = new List<object> { key, comparator }; + var args = new List<object> { traversal, comparator }; Bytecode.AddStep("by", args); return Wrap< S , E >(this); } @@ -365,9 +365,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the choose step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E2 > Choose<E2> (TraversalPredicate choosePredicate, ITraversal trueChoice) + public GraphTraversal< S , E2 > Choose<E2> (object choiceFunction) { - var args = new List<object> { choosePredicate, trueChoice }; + var args = new List<object> { choiceFunction }; Bytecode.AddStep("choose", args); return Wrap< S , E2 >(this); } @@ -375,9 +375,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the choose step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E2 > Choose<E2> (TraversalPredicate choosePredicate, ITraversal trueChoice, ITraversal falseChoice) + public GraphTraversal< S , E2 > Choose<E2> (TraversalPredicate choosePredicate, ITraversal trueChoice) { - var args = new List<object> { choosePredicate, trueChoice, falseChoice }; + var args = new List<object> { choosePredicate, trueChoice }; Bytecode.AddStep("choose", args); return Wrap< S , E2 >(this); } @@ -385,9 +385,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the choose step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E2 > Choose<E2> (object choiceFunction) + public GraphTraversal< S , E2 > Choose<E2> (TraversalPredicate choosePredicate, ITraversal trueChoice, ITraversal falseChoice) { - var args = new List<object> { choiceFunction }; + var args = new List<object> { choosePredicate, trueChoice, falseChoice }; Bytecode.AddStep("choose", args); return Wrap< S , E2 >(this); } @@ -395,9 +395,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the choose step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E2 > Choose<E2> (ITraversal traversalPredicate, ITraversal trueChoice, ITraversal falseChoice) + public GraphTraversal< S , E2 > Choose<E2> (ITraversal choiceTraversal) { - var args = new List<object> { traversalPredicate, trueChoice, falseChoice }; + var args = new List<object> { choiceTraversal }; Bytecode.AddStep("choose", args); return Wrap< S , E2 >(this); } @@ -415,9 +415,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the choose step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E2 > Choose<E2> (ITraversal choiceTraversal) + public GraphTraversal< S , E2 > Choose<E2> (ITraversal traversalPredicate, ITraversal trueChoice, ITraversal falseChoice) { - var args = new List<object> { choiceTraversal }; + var args = new List<object> { traversalPredicate, trueChoice, falseChoice }; Bytecode.AddStep("choose", args); return Wrap< S , E2 >(this); } @@ -485,9 +485,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the dedup step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > Dedup (params string[] dedupLabels) + public GraphTraversal< S , E > Dedup (Scope scope, params string[] dedupLabels) { - var args = new List<object> { dedupLabels }; + var args = new List<object> { scope, dedupLabels }; Bytecode.AddStep("dedup", args); return Wrap< S , E >(this); } @@ -495,9 +495,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the dedup step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > Dedup (Scope scope, params string[] dedupLabels) + public GraphTraversal< S , E > Dedup (params string[] dedupLabels) { - var args = new List<object> { scope, dedupLabels }; + var args = new List<object> { dedupLabels }; Bytecode.AddStep("dedup", args); return Wrap< S , E >(this); } @@ -545,9 +545,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the filter step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > Filter (ITraversal filterTraversal) + public GraphTraversal< S , E > Filter (TraversalPredicate predicate) { - var args = new List<object> { filterTraversal }; + var args = new List<object> { predicate }; Bytecode.AddStep("filter", args); return Wrap< S , E >(this); } @@ -555,9 +555,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the filter step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > Filter (TraversalPredicate predicate) + public GraphTraversal< S , E > Filter (ITraversal filterTraversal) { - var args = new List<object> { predicate }; + var args = new List<object> { filterTraversal }; Bytecode.AddStep("filter", args); return Wrap< S , E >(this); } @@ -565,16 +565,6 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the flatMap step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E2 > FlatMap<E2> (ITraversal flatMapTraversal) - { - var args = new List<object> { flatMapTraversal }; - Bytecode.AddStep("flatMap", args); - return Wrap< S , E2 >(this); - } - - /// <summary> - /// Adds the flatMap step to this <see cref="GraphTraversal{SType, EType}" />. - /// </summary> public GraphTraversal< S , E2 > FlatMap<E2> (object function) { var args = new List<object> { function }; @@ -583,12 +573,12 @@ namespace Gremlin.Net.Process.Traversal } /// <summary> - /// Adds the fold step to this <see cref="GraphTraversal{SType, EType}" />. + /// Adds the flatMap step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E2 > Fold<E2> (object seed, object foldFunction) + public GraphTraversal< S , E2 > FlatMap<E2> (ITraversal flatMapTraversal) { - var args = new List<object> { seed, foldFunction }; - Bytecode.AddStep("fold", args); + var args = new List<object> { flatMapTraversal }; + Bytecode.AddStep("flatMap", args); return Wrap< S , E2 >(this); } @@ -603,13 +593,13 @@ namespace Gremlin.Net.Process.Traversal } /// <summary> - /// Adds the from step to this <see cref="GraphTraversal{SType, EType}" />. + /// Adds the fold step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > From (ITraversal fromVertex) + public GraphTraversal< S , E2 > Fold<E2> (object seed, object foldFunction) { - var args = new List<object> { fromVertex }; - Bytecode.AddStep("from", args); - return Wrap< S , E >(this); + var args = new List<object> { seed, foldFunction }; + Bytecode.AddStep("fold", args); + return Wrap< S , E2 >(this); } /// <summary> @@ -623,12 +613,12 @@ namespace Gremlin.Net.Process.Traversal } /// <summary> - /// Adds the group step to this <see cref="GraphTraversal{SType, EType}" />. + /// Adds the from step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > Group (string sideEffectKey) + public GraphTraversal< S , E > From (ITraversal fromVertex) { - var args = new List<object> { sideEffectKey }; - Bytecode.AddStep("group", args); + var args = new List<object> { fromVertex }; + Bytecode.AddStep("from", args); return Wrap< S , E >(this); } @@ -643,12 +633,12 @@ namespace Gremlin.Net.Process.Traversal } /// <summary> - /// Adds the groupCount step to this <see cref="GraphTraversal{SType, EType}" />. + /// Adds the group step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > GroupCount (string sideEffectKey) + public GraphTraversal< S , E > Group (string sideEffectKey) { var args = new List<object> { sideEffectKey }; - Bytecode.AddStep("groupCount", args); + Bytecode.AddStep("group", args); return Wrap< S , E >(this); } @@ -663,12 +653,12 @@ namespace Gremlin.Net.Process.Traversal } /// <summary> - /// Adds the groupV3d0 step to this <see cref="GraphTraversal{SType, EType}" />. + /// Adds the groupCount step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > GroupV3d0 (string sideEffectKey) + public GraphTraversal< S , E > GroupCount (string sideEffectKey) { var args = new List<object> { sideEffectKey }; - Bytecode.AddStep("groupV3d0", args); + Bytecode.AddStep("groupCount", args); return Wrap< S , E >(this); } @@ -683,6 +673,16 @@ namespace Gremlin.Net.Process.Traversal } /// <summary> + /// Adds the groupV3d0 step to this <see cref="GraphTraversal{SType, EType}" />. + /// </summary> + public GraphTraversal< S , E > GroupV3d0 (string sideEffectKey) + { + var args = new List<object> { sideEffectKey }; + Bytecode.AddStep("groupV3d0", args); + return Wrap< S , E >(this); + } + + /// <summary> /// Adds the has step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> public GraphTraversal< S , E > Has (string propertyKey) @@ -705,9 +705,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the has step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > Has (T accessor, ITraversal propertyTraversal) + public GraphTraversal< S , E > Has (string propertyKey, TraversalPredicate predicate) { - var args = new List<object> { accessor, propertyTraversal }; + var args = new List<object> { propertyKey, predicate }; Bytecode.AddStep("has", args); return Wrap< S , E >(this); } @@ -715,9 +715,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the has step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > Has (T accessor, TraversalPredicate predicate) + public GraphTraversal< S , E > Has (string label, string propertyKey, object value) { - var args = new List<object> { accessor, predicate }; + var args = new List<object> { label, propertyKey, value }; Bytecode.AddStep("has", args); return Wrap< S , E >(this); } @@ -725,9 +725,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the has step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > Has (string propertyKey, TraversalPredicate predicate) + public GraphTraversal< S , E > Has (string label, string propertyKey, TraversalPredicate predicate) { - var args = new List<object> { propertyKey, predicate }; + var args = new List<object> { label, propertyKey, predicate }; Bytecode.AddStep("has", args); return Wrap< S , E >(this); } @@ -735,9 +735,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the has step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > Has (T accessor, object value) + public GraphTraversal< S , E > Has (string propertyKey, ITraversal propertyTraversal) { - var args = new List<object> { accessor, value }; + var args = new List<object> { propertyKey, propertyTraversal }; Bytecode.AddStep("has", args); return Wrap< S , E >(this); } @@ -745,9 +745,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the has step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > Has (string label, string propertyKey, TraversalPredicate predicate) + public GraphTraversal< S , E > Has (T accessor, object value) { - var args = new List<object> { label, propertyKey, predicate }; + var args = new List<object> { accessor, value }; Bytecode.AddStep("has", args); return Wrap< S , E >(this); } @@ -755,9 +755,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the has step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > Has (string label, string propertyKey, object value) + public GraphTraversal< S , E > Has (T accessor, TraversalPredicate predicate) { - var args = new List<object> { label, propertyKey, value }; + var args = new List<object> { accessor, predicate }; Bytecode.AddStep("has", args); return Wrap< S , E >(this); } @@ -765,9 +765,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the has step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > Has (string propertyKey, ITraversal propertyTraversal) + public GraphTraversal< S , E > Has (T accessor, ITraversal propertyTraversal) { - var args = new List<object> { propertyKey, propertyTraversal }; + var args = new List<object> { accessor, propertyTraversal }; Bytecode.AddStep("has", args); return Wrap< S , E >(this); } @@ -795,9 +795,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the hasKey step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > HasKey (string label, params string[] otherLabels) + public GraphTraversal< S , E > HasKey (TraversalPredicate predicate) { - var args = new List<object> { label, otherLabels }; + var args = new List<object> { predicate }; Bytecode.AddStep("hasKey", args); return Wrap< S , E >(this); } @@ -805,9 +805,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the hasKey step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > HasKey (TraversalPredicate predicate) + public GraphTraversal< S , E > HasKey (string label, params string[] otherLabels) { - var args = new List<object> { predicate }; + var args = new List<object> { label, otherLabels }; Bytecode.AddStep("hasKey", args); return Wrap< S , E >(this); } @@ -815,9 +815,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the hasLabel step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > HasLabel (string label, params string[] otherLabels) + public GraphTraversal< S , E > HasLabel (TraversalPredicate predicate) { - var args = new List<object> { label, otherLabels }; + var args = new List<object> { predicate }; Bytecode.AddStep("hasLabel", args); return Wrap< S , E >(this); } @@ -825,9 +825,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the hasLabel step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > HasLabel (TraversalPredicate predicate) + public GraphTraversal< S , E > HasLabel (string label, params string[] otherLabels) { - var args = new List<object> { predicate }; + var args = new List<object> { label, otherLabels }; Bytecode.AddStep("hasLabel", args); return Wrap< S , E >(this); } @@ -845,9 +845,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the hasValue step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > HasValue (TraversalPredicate predicate) + public GraphTraversal< S , E > HasValue (object value, params object[] otherValues) { - var args = new List<object> { predicate }; + var args = new List<object> { value, otherValues }; Bytecode.AddStep("hasValue", args); return Wrap< S , E >(this); } @@ -855,9 +855,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the hasValue step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > HasValue (object value, params object[] otherValues) + public GraphTraversal< S , E > HasValue (TraversalPredicate predicate) { - var args = new List<object> { value, otherValues }; + var args = new List<object> { predicate }; Bytecode.AddStep("hasValue", args); return Wrap< S , E >(this); } @@ -925,9 +925,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the is step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > Is (TraversalPredicate predicate) + public GraphTraversal< S , E > Is (object value) { - var args = new List<object> { predicate }; + var args = new List<object> { value }; Bytecode.AddStep("is", args); return Wrap< S , E >(this); } @@ -935,9 +935,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the is step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > Is (object value) + public GraphTraversal< S , E > Is (TraversalPredicate predicate) { - var args = new List<object> { value }; + var args = new List<object> { predicate }; Bytecode.AddStep("is", args); return Wrap< S , E >(this); } @@ -965,21 +965,21 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the limit step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > Limit (long limit) + public GraphTraversal< S , E2 > Limit<E2> (Scope scope, long limit) { - var args = new List<object> { limit }; + var args = new List<object> { scope, limit }; Bytecode.AddStep("limit", args); - return Wrap< S , E >(this); + return Wrap< S , E2 >(this); } /// <summary> /// Adds the limit step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E2 > Limit<E2> (Scope scope, long limit) + public GraphTraversal< S , E > Limit (long limit) { - var args = new List<object> { scope, limit }; + var args = new List<object> { limit }; Bytecode.AddStep("limit", args); - return Wrap< S , E2 >(this); + return Wrap< S , E >(this); } /// <summary> @@ -1005,9 +1005,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the map step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E2 > Map<E2> (ITraversal mapTraversal) + public GraphTraversal< S , E2 > Map<E2> (object function) { - var args = new List<object> { mapTraversal }; + var args = new List<object> { function }; Bytecode.AddStep("map", args); return Wrap< S , E2 >(this); } @@ -1015,9 +1015,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the map step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E2 > Map<E2> (object function) + public GraphTraversal< S , E2 > Map<E2> (ITraversal mapTraversal) { - var args = new List<object> { function }; + var args = new List<object> { mapTraversal }; Bytecode.AddStep("map", args); return Wrap< S , E2 >(this); } @@ -1055,9 +1055,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the max step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E2 > Max<E2> (Scope scope) + public GraphTraversal< S , E2 > Max<E2> () { - var args = new List<object> { scope }; + var args = new List<object> { }; Bytecode.AddStep("max", args); return Wrap< S , E2 >(this); } @@ -1065,9 +1065,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the max step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E2 > Max<E2> () + public GraphTraversal< S , E2 > Max<E2> (Scope scope) { - var args = new List<object> { }; + var args = new List<object> { scope }; Bytecode.AddStep("max", args); return Wrap< S , E2 >(this); } @@ -1075,9 +1075,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the mean step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E2 > Mean<E2> (Scope scope) + public GraphTraversal< S , E2 > Mean<E2> () { - var args = new List<object> { scope }; + var args = new List<object> { }; Bytecode.AddStep("mean", args); return Wrap< S , E2 >(this); } @@ -1085,9 +1085,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the mean step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E2 > Mean<E2> () + public GraphTraversal< S , E2 > Mean<E2> (Scope scope) { - var args = new List<object> { }; + var args = new List<object> { scope }; Bytecode.AddStep("mean", args); return Wrap< S , E2 >(this); } @@ -1095,9 +1095,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the min step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E2 > Min<E2> (Scope scope) + public GraphTraversal< S , E2 > Min<E2> () { - var args = new List<object> { scope }; + var args = new List<object> { }; Bytecode.AddStep("min", args); return Wrap< S , E2 >(this); } @@ -1105,9 +1105,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the min step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E2 > Min<E2> () + public GraphTraversal< S , E2 > Min<E2> (Scope scope) { - var args = new List<object> { }; + var args = new List<object> { scope }; Bytecode.AddStep("min", args); return Wrap< S , E2 >(this); } @@ -1125,9 +1125,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the option step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > Option (ITraversal traversalOption) + public GraphTraversal< S , E > Option (object pickToken, ITraversal traversalOption) { - var args = new List<object> { traversalOption }; + var args = new List<object> { pickToken, traversalOption }; Bytecode.AddStep("option", args); return Wrap< S , E >(this); } @@ -1135,9 +1135,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the option step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > Option (object pickToken, ITraversal traversalOption) + public GraphTraversal< S , E > Option (ITraversal traversalOption) { - var args = new List<object> { pickToken, traversalOption }; + var args = new List<object> { traversalOption }; Bytecode.AddStep("option", args); return Wrap< S , E >(this); } @@ -1165,9 +1165,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the order step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > Order (Scope scope) + public GraphTraversal< S , E > Order () { - var args = new List<object> { scope }; + var args = new List<object> { }; Bytecode.AddStep("order", args); return Wrap< S , E >(this); } @@ -1175,9 +1175,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the order step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > Order () + public GraphTraversal< S , E > Order (Scope scope) { - var args = new List<object> { }; + var args = new List<object> { scope }; Bytecode.AddStep("order", args); return Wrap< S , E >(this); } @@ -1375,29 +1375,29 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the sack step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > Sack (object sackOperator, string elementPropertyKey) + public GraphTraversal< S , E2 > Sack<E2> () { - var args = new List<object> { sackOperator, elementPropertyKey }; + var args = new List<object> { }; Bytecode.AddStep("sack", args); - return Wrap< S , E >(this); + return Wrap< S , E2 >(this); } /// <summary> /// Adds the sack step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E2 > Sack<E2> () + public GraphTraversal< S , E > Sack (object sackOperator) { - var args = new List<object> { }; + var args = new List<object> { sackOperator }; Bytecode.AddStep("sack", args); - return Wrap< S , E2 >(this); + return Wrap< S , E >(this); } /// <summary> /// Adds the sack step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > Sack (object sackOperator) + public GraphTraversal< S , E > Sack (object sackOperator, string elementPropertyKey) { - var args = new List<object> { sackOperator }; + var args = new List<object> { sackOperator, elementPropertyKey }; Bytecode.AddStep("sack", args); return Wrap< S , E >(this); } @@ -1425,31 +1425,31 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the select step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , IDictionary<string, E2> > Select<E2> (Pop pop, string selectKey1, string selectKey2, params string[] otherSelectKeys) + public GraphTraversal< S , ICollection<E2> > Select<E2> (Column column) { - var args = new List<object> { pop, selectKey1, selectKey2, otherSelectKeys }; + var args = new List<object> { column }; Bytecode.AddStep("select", args); - return Wrap< S , IDictionary<string, E2> >(this); + return Wrap< S , ICollection<E2> >(this); } /// <summary> /// Adds the select step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , IDictionary<string, E2> > Select<E2> (string selectKey1, string selectKey2, params string[] otherSelectKeys) + public GraphTraversal< S , E2 > Select<E2> (Pop pop, string selectKey) { - var args = new List<object> { selectKey1, selectKey2, otherSelectKeys }; + var args = new List<object> { pop, selectKey }; Bytecode.AddStep("select", args); - return Wrap< S , IDictionary<string, E2> >(this); + return Wrap< S , E2 >(this); } /// <summary> /// Adds the select step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E2 > Select<E2> (Pop pop, string selectKey) + public GraphTraversal< S , IDictionary<string, E2> > Select<E2> (Pop pop, string selectKey1, string selectKey2, params string[] otherSelectKeys) { - var args = new List<object> { pop, selectKey }; + var args = new List<object> { pop, selectKey1, selectKey2, otherSelectKeys }; Bytecode.AddStep("select", args); - return Wrap< S , E2 >(this); + return Wrap< S , IDictionary<string, E2> >(this); } /// <summary> @@ -1465,11 +1465,11 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the select step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , ICollection<E2> > Select<E2> (Column column) + public GraphTraversal< S , IDictionary<string, E2> > Select<E2> (string selectKey1, string selectKey2, params string[] otherSelectKeys) { - var args = new List<object> { column }; + var args = new List<object> { selectKey1, selectKey2, otherSelectKeys }; Bytecode.AddStep("select", args); - return Wrap< S , ICollection<E2> >(this); + return Wrap< S , IDictionary<string, E2> >(this); } /// <summary> @@ -1545,41 +1545,41 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the tail step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E2 > Tail<E2> (Scope scope, long limit) + public GraphTraversal< S , E > Tail () { - var args = new List<object> { scope, limit }; + var args = new List<object> { }; Bytecode.AddStep("tail", args); - return Wrap< S , E2 >(this); + return Wrap< S , E >(this); } /// <summary> /// Adds the tail step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > Tail () + public GraphTraversal< S , E2 > Tail<E2> (Scope scope) { - var args = new List<object> { }; + var args = new List<object> { scope }; Bytecode.AddStep("tail", args); - return Wrap< S , E >(this); + return Wrap< S , E2 >(this); } /// <summary> /// Adds the tail step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > Tail (long limit) + public GraphTraversal< S , E2 > Tail<E2> (Scope scope, long limit) { - var args = new List<object> { limit }; + var args = new List<object> { scope, limit }; Bytecode.AddStep("tail", args); - return Wrap< S , E >(this); + return Wrap< S , E2 >(this); } /// <summary> /// Adds the tail step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E2 > Tail<E2> (Scope scope) + public GraphTraversal< S , E > Tail (long limit) { - var args = new List<object> { scope }; + var args = new List<object> { limit }; Bytecode.AddStep("tail", args); - return Wrap< S , E2 >(this); + return Wrap< S , E >(this); } /// <summary> @@ -1655,21 +1655,21 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the tree step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > Tree (string sideEffectKey) + public GraphTraversal< S , E2 > Tree<E2> () { - var args = new List<object> { sideEffectKey }; + var args = new List<object> { }; Bytecode.AddStep("tree", args); - return Wrap< S , E >(this); + return Wrap< S , E2 >(this); } /// <summary> /// Adds the tree step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E2 > Tree<E2> () + public GraphTraversal< S , E > Tree (string sideEffectKey) { - var args = new List<object> { }; + var args = new List<object> { sideEffectKey }; Bytecode.AddStep("tree", args); - return Wrap< S , E2 >(this); + return Wrap< S , E >(this); } /// <summary> @@ -1755,9 +1755,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the where step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > Where (ITraversal whereTraversal) + public GraphTraversal< S , E > Where (TraversalPredicate predicate) { - var args = new List<object> { whereTraversal }; + var args = new List<object> { predicate }; Bytecode.AddStep("where", args); return Wrap< S , E >(this); } @@ -1765,9 +1765,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the where step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > Where (TraversalPredicate predicate) + public GraphTraversal< S , E > Where (string startKey, TraversalPredicate predicate) { - var args = new List<object> { predicate }; + var args = new List<object> { startKey, predicate }; Bytecode.AddStep("where", args); return Wrap< S , E >(this); } @@ -1775,9 +1775,9 @@ namespace Gremlin.Net.Process.Traversal /// <summary> /// Adds the where step to this <see cref="GraphTraversal{SType, EType}" />. /// </summary> - public GraphTraversal< S , E > Where (string startKey, TraversalPredicate predicate) + public GraphTraversal< S , E > Where (ITraversal whereTraversal) { - var args = new List<object> { startKey, predicate }; + var args = new List<object> { whereTraversal }; Bytecode.AddStep("where", args); return Wrap< S , E >(this); } http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8a16d4b3/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversalSource.cs ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversalSource.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversalSource.cs index df1fbee..27e0e73 100644 --- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversalSource.cs +++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversalSource.cs @@ -90,65 +90,65 @@ namespace Gremlin.Net.Process.Traversal return source; } - public GraphTraversalSource WithSack(object initialValue, object splitOperator, object mergeOperator) + public GraphTraversalSource WithSack(object initialValue) { var source = new GraphTraversalSource(new List<ITraversalStrategy>(TraversalStrategies), new Bytecode(Bytecode)); - var args = new List<object> { initialValue, splitOperator, mergeOperator }; + var args = new List<object> { initialValue }; source.Bytecode.AddSource("withSack", args); return source; } - public GraphTraversalSource WithSack(object initialValue) + public GraphTraversalSource WithSack(object initialValue, object mergeOperator) { var source = new GraphTraversalSource(new List<ITraversalStrategy>(TraversalStrategies), new Bytecode(Bytecode)); - var args = new List<object> { initialValue }; + var args = new List<object> { initialValue, mergeOperator }; source.Bytecode.AddSource("withSack", args); return source; } - public GraphTraversalSource WithSack(object initialValue, object mergeOperator) + public GraphTraversalSource WithSack(object initialValue, object splitOperator) { var source = new GraphTraversalSource(new List<ITraversalStrategy>(TraversalStrategies), new Bytecode(Bytecode)); - var args = new List<object> { initialValue, mergeOperator }; + var args = new List<object> { initialValue, splitOperator }; source.Bytecode.AddSource("withSack", args); return source; } - public GraphTraversalSource WithSack(object initialValue, object mergeOperator) + public GraphTraversalSource WithSack(object initialValue, object splitOperator, object mergeOperator) { var source = new GraphTraversalSource(new List<ITraversalStrategy>(TraversalStrategies), new Bytecode(Bytecode)); - var args = new List<object> { initialValue, mergeOperator }; + var args = new List<object> { initialValue, splitOperator, mergeOperator }; source.Bytecode.AddSource("withSack", args); return source; } - public GraphTraversalSource WithSack(object initialValue, object splitOperator) + public GraphTraversalSource WithSack(object initialValue) { var source = new GraphTraversalSource(new List<ITraversalStrategy>(TraversalStrategies), new Bytecode(Bytecode)); - var args = new List<object> { initialValue, splitOperator }; + var args = new List<object> { initialValue }; source.Bytecode.AddSource("withSack", args); return source; } - public GraphTraversalSource WithSack(object initialValue, object splitOperator) + public GraphTraversalSource WithSack(object initialValue, object mergeOperator) { var source = new GraphTraversalSource(new List<ITraversalStrategy>(TraversalStrategies), new Bytecode(Bytecode)); - var args = new List<object> { initialValue, splitOperator }; + var args = new List<object> { initialValue, mergeOperator }; source.Bytecode.AddSource("withSack", args); return source; } - public GraphTraversalSource WithSack(object initialValue) + public GraphTraversalSource WithSack(object initialValue, object splitOperator) { var source = new GraphTraversalSource(new List<ITraversalStrategy>(TraversalStrategies), new Bytecode(Bytecode)); - var args = new List<object> { initialValue }; + var args = new List<object> { initialValue, splitOperator }; source.Bytecode.AddSource("withSack", args); return source; } @@ -162,20 +162,20 @@ namespace Gremlin.Net.Process.Traversal return source; } - public GraphTraversalSource WithSideEffect(string key, object initialValue, object reducer) + public GraphTraversalSource WithSideEffect(string key, object initialValue) { var source = new GraphTraversalSource(new List<ITraversalStrategy>(TraversalStrategies), new Bytecode(Bytecode)); - var args = new List<object> { key, initialValue, reducer }; + var args = new List<object> { key, initialValue }; source.Bytecode.AddSource("withSideEffect", args); return source; } - public GraphTraversalSource WithSideEffect(string key, object initialValue) + public GraphTraversalSource WithSideEffect(string key, object initialValue, object reducer) { var source = new GraphTraversalSource(new List<ITraversalStrategy>(TraversalStrategies), new Bytecode(Bytecode)); - var args = new List<object> { key, initialValue }; + var args = new List<object> { key, initialValue, reducer }; source.Bytecode.AddSource("withSideEffect", args); return source; } @@ -279,10 +279,10 @@ namespace Gremlin.Net.Process.Traversal /// Spawns a <see cref="GraphTraversal{SType, EType}" /> off this graph traversal source and adds the addV step to that /// traversal. /// </summary> - public GraphTraversal< Vertex,Vertex > AddV(string label) + public GraphTraversal< Vertex,Vertex > AddV() { var traversal = new GraphTraversal< Vertex,Vertex >(TraversalStrategies, new Bytecode(Bytecode)); - var args = new List<object> { label }; + var args = new List<object> { }; traversal.Bytecode.AddStep("addV", args); return traversal; } @@ -291,10 +291,10 @@ namespace Gremlin.Net.Process.Traversal /// Spawns a <see cref="GraphTraversal{SType, EType}" /> off this graph traversal source and adds the addV step to that /// traversal. /// </summary> - public GraphTraversal< Vertex,Vertex > AddV() + public GraphTraversal< Vertex,Vertex > AddV(params object[] keyValues) { var traversal = new GraphTraversal< Vertex,Vertex >(TraversalStrategies, new Bytecode(Bytecode)); - var args = new List<object> { }; + var args = new List<object> { keyValues }; traversal.Bytecode.AddStep("addV", args); return traversal; } @@ -303,10 +303,10 @@ namespace Gremlin.Net.Process.Traversal /// Spawns a <see cref="GraphTraversal{SType, EType}" /> off this graph traversal source and adds the addV step to that /// traversal. /// </summary> - public GraphTraversal< Vertex,Vertex > AddV(params object[] keyValues) + public GraphTraversal< Vertex,Vertex > AddV(string label) { var traversal = new GraphTraversal< Vertex,Vertex >(TraversalStrategies, new Bytecode(Bytecode)); - var args = new List<object> { keyValues }; + var args = new List<object> { label }; traversal.Bytecode.AddStep("addV", args); return traversal; }
