You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by jo...@apache.org on 2017/07/14 10:23:27 UTC
[1/2] tinkerpop git commit: DotNet: Generate ValueMap() method with 2
type parameters
Repository: tinkerpop
Updated Branches:
refs/heads/TINKERPOP-1552-master 6115cf4aa -> cbcb64062
DotNet: Generate ValueMap() method with 2 type parameters
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/c074ea05
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/c074ea05
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/c074ea05
Branch: refs/heads/TINKERPOP-1552-master
Commit: c074ea05bae2c0b94d0c8c0e2a2790c1779d1d0e
Parents: 6115cf4
Author: Jorge Bay Gondra <jo...@gmail.com>
Authored: Wed Jul 12 17:11:42 2017 +0200
Committer: Jorge Bay Gondra <jo...@gmail.com>
Committed: Fri Jul 14 11:57:50 2017 +0200
----------------------------------------------------------------------
gremlin-dotnet/pom.xml | 8 +++++++-
.../src/Gremlin.Net/Process/Traversal/GraphTraversal.cs | 8 ++++----
gremlin-dotnet/src/Gremlin.Net/Process/Traversal/__.cs | 4 ++--
.../Traversal/DriverRemoteConnection/GraphTraversalTests.cs | 4 ++--
4 files changed, 15 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c074ea05/gremlin-dotnet/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/pom.xml b/gremlin-dotnet/pom.xml
index 2ba30ec..319bb9c 100644
--- a/gremlin-dotnet/pom.xml
+++ b/gremlin-dotnet/pom.xml
@@ -108,7 +108,8 @@ def methodsWithSpecificTypes = ["constant": useE2,
"sum": useE2,
"tail": useE2,
"tree": ["object"],
- "unfold": useE2]
+ "unfold": useE2,
+ "valueMap": ["IDictionary<TKey, TValue>", "TKey, TValue"],]
def getCSharpGenericTypeParam = { typeName ->
def tParam = ""
@@ -183,6 +184,11 @@ def binding = ["pmethods": P.class.getMethods().
def t1 = toCSharpType(typeNames[0])
def t2 = toCSharpType(typeNames[1])
def tParam = getCSharpGenericTypeParam(t2)
+ def specificTypes = methodsWithSpecificTypes.get(javaMethod.name)
+ if (specificTypes) {
+ t2 = specificTypes[0]
+ tParam = specificTypes.size() > 1 ? "<" + specificTypes[1] + ">" : ""
+ }
return ["methodName": javaMethod.name, "t1":t1, "t2":t2, "tParam":tParam]
},
"anonStepMethods": __.class.getMethods().
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c074ea05/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 8f5b48c..8f22888 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
@@ -893,10 +893,10 @@ namespace Gremlin.Net.Process.Traversal
/// <summary>
/// Adds the tree step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal< S , E > Tree (params object[] args)
+ public GraphTraversal< S , object > Tree (params object[] args)
{
Bytecode.AddStep("tree", args);
- return Wrap< S , E >(this);
+ return Wrap< S , object >(this);
}
/// <summary>
@@ -938,10 +938,10 @@ namespace Gremlin.Net.Process.Traversal
/// <summary>
/// Adds the valueMap step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal< S , IDictionary<object, E2> > ValueMap<E2> (params object[] args)
+ public GraphTraversal< S , IDictionary<TKey, TValue> > ValueMap<TKey, TValue> (params object[] args)
{
Bytecode.AddStep("valueMap", args);
- return Wrap< S , IDictionary<object, E2> >(this);
+ return Wrap< S , IDictionary<TKey, TValue> >(this);
}
/// <summary>
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c074ea05/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/__.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/__.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/__.cs
index e0e6e42..c1aed20 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/__.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/__.cs
@@ -763,9 +763,9 @@ namespace Gremlin.Net.Process.Traversal
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the valueMap step to that traversal.
/// </summary>
- public static GraphTraversal<object, IDictionary<object, E2>> ValueMap<E2>(params object[] args)
+ public static GraphTraversal<object, IDictionary<TKey, TValue>> ValueMap<TKey, TValue>(params object[] args)
{
- return new GraphTraversal<object, object>().ValueMap<E2>(args);
+ return new GraphTraversal<object, object>().ValueMap<TKey, TValue>(args);
}
/// <summary>
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c074ea05/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Process/Traversal/DriverRemoteConnection/GraphTraversalTests.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Process/Traversal/DriverRemoteConnection/GraphTraversalTests.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Process/Traversal/DriverRemoteConnection/GraphTraversalTests.cs
index 24c75b0..11190ce 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Process/Traversal/DriverRemoteConnection/GraphTraversalTests.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Process/Traversal/DriverRemoteConnection/GraphTraversalTests.cs
@@ -102,9 +102,9 @@ namespace Gremlin.Net.IntegrationTest.Process.Traversal.DriverRemoteConnection
var connection = _connectionFactory.CreateRemoteConnection();
var g = graph.Traversal().WithRemote(connection);
- var receivedValueMap = g.V().Has("name", "marko").ValueMap<object>().Next();
+ var receivedValueMap = g.V().Has("name", "marko").ValueMap<string, object>().Next();
- var expectedValueMap = new Dictionary<object, object>
+ var expectedValueMap = new Dictionary<string, object>
{
{"age", new List<object> {29}},
{"name", new List<object> {"marko"}}
[2/2] tinkerpop git commit: Doc: Use DotNet instead .NET because
asciidoc parser chokes on titles starting with `.`
Posted by jo...@apache.org.
Doc: Use DotNet instead .NET because asciidoc parser chokes on titles starting with `.`
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/cbcb6406
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/cbcb6406
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/cbcb6406
Branch: refs/heads/TINKERPOP-1552-master
Commit: cbcb640623bd56108c5630c58fc200bda696104c
Parents: c074ea0
Author: Jorge Bay Gondra <jo...@gmail.com>
Authored: Fri Jul 14 12:23:17 2017 +0200
Committer: Jorge Bay Gondra <jo...@gmail.com>
Committed: Fri Jul 14 12:23:17 2017 +0200
----------------------------------------------------------------------
docs/src/dev/developer/development-environment.asciidoc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/cbcb6406/docs/src/dev/developer/development-environment.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/dev/developer/development-environment.asciidoc b/docs/src/dev/developer/development-environment.asciidoc
index 6e3d350..8c6d75d 100644
--- a/docs/src/dev/developer/development-environment.asciidoc
+++ b/docs/src/dev/developer/development-environment.asciidoc
@@ -102,8 +102,8 @@ integration tests and therefore must be actively switched on with `-DskipIntegra
mvn clean install -pl gremlin-console -DskipIntegrationTests=false
[[dotnet-environment]]
-.NET Environment
-~~~~~~~~~~~~~~~~
+DotNet Environment
+~~~~~~~~~~~~~~~~~~
The build optionally requires link:https://www.microsoft.com/net/core[.NET Core SDK] (>=1.1.0) to work with the
`gremlin-dotnet` module. If .NET Core SDK is not installed, TinkerPop will still build with Maven, but .NET projects