You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2017/11/30 12:06:33 UTC
[13/15] tinkerpop git commit: TINKERPOP-1734 DSL class name
adjustments
TINKERPOP-1734 DSL class name adjustments
DSL classes are now more consistently named. Also added static import directive for DSL anonymous traversals.
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/fcc52f5d
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/fcc52f5d
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/fcc52f5d
Branch: refs/heads/TINKERPOP-1734
Commit: fcc52f5dd49957e6492c7e39c6d3450278637de4
Parents: f242894
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Nov 30 07:04:08 2017 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Nov 30 07:06:10 2017 -0500
----------------------------------------------------------------------
docs/src/reference/the-traversal.asciidoc | 7 ++++---
.../Process/Traversal/Dsl/DslTest.cs | 4 ++--
2 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/fcc52f5d/docs/src/reference/the-traversal.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc
index 3cd273e..42bec58 100644
--- a/docs/src/reference/the-traversal.asciidoc
+++ b/docs/src/reference/the-traversal.asciidoc
@@ -3234,7 +3234,7 @@ second static class to deal with when writing traversals rather than just callin
namespace Dsl
{
- public static class SocialTraversal
+ public static class SocialTraversalExtensions
{
public static GraphTraversal<Vertex,Vertex> Knows(this GraphTraversal<Vertex,Vertex> t, string personName)
{
@@ -3270,7 +3270,7 @@ namespace Dsl
}
}
- public static class SocialTraversalSource
+ public static class SocialTraversalSourceExtensions
{
public static GraphTraversal<Vertex,Vertex> Persons(this GraphTraversalSource g, params string[] personNames)
{
@@ -3294,6 +3294,7 @@ requirement. To use the DSL, bring it into scope with the `using` directive:
[source,csharp]
----
using Dsl;
+using static Dsl.__Social;
----
and then it can be called from the application as follows:
@@ -3306,5 +3307,5 @@ var social = graph.Traversal().WithRemote(connection);
social.Persons("marko").Knows("josh");
social.Persons("marko").YoungestFriendsAge();
-social.Persons().Filter(__Social.CreatedAtLeast(2)).Count();
+social.Persons().Filter(CreatedAtLeast(2)).Count();
----
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/fcc52f5d/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Process/Traversal/Dsl/DslTest.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Process/Traversal/Dsl/DslTest.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Process/Traversal/Dsl/DslTest.cs
index 8813aad..ae7fa49 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Process/Traversal/Dsl/DslTest.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Process/Traversal/Dsl/DslTest.cs
@@ -30,7 +30,7 @@ using Xunit;
namespace Gremlin.Net.IntegrationTest.Process.Traversal.Dsl
{
- public static class SocialTraversal
+ public static class SocialTraversalExtensions
{
public static GraphTraversal<Vertex,Vertex> Knows(this GraphTraversal<Vertex,Vertex> t, string personName)
{
@@ -66,7 +66,7 @@ namespace Gremlin.Net.IntegrationTest.Process.Traversal.Dsl
}
}
- public static class SocialTraversalSource
+ public static class SocialTraversalSourceExtensions
{
public static GraphTraversal<Vertex,Vertex> Persons(this GraphTraversalSource g, params string[] personNames)
{