This is an automated email from the ASF dual-hosted git repository.

colegreer pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/master by this push:
     new 76b29896e9 Revert "CTR Update examples to use new with() syntax when 
creating g"
76b29896e9 is described below

commit 76b29896e9a1b0504138dd9ded4ff8f991dceb99
Author: Cole-Greer <cole.gr...@improving.com>
AuthorDate: Tue Dec 19 13:13:29 2023 -0800

    Revert "CTR Update examples to use new with() syntax when creating g"
    
    This reverts commit 307ebbcbcd72de6f3666b73c1288f500fbc2181a.
    
    This commit was previously updating the master branch examples to use new
    4.0.0 syntax, however these examples cannot be used without 4.0.0 artifacts
    being published. I am reverting this for now such that master will continue
    to host 3.7 examples which will remain fully functional.
---
 gremlin-dotnet/Examples/BasicGremlin/BasicGremlin.cs         | 2 +-
 gremlin-dotnet/Examples/Connections/Connections.cs           | 2 +-
 gremlin-dotnet/Examples/ModernTraversals/ModernTraversals.cs | 2 +-
 gremlin-driver/src/main/java/examples/BasicGremlin.java      | 2 +-
 gremlin-driver/src/main/java/examples/Connections.java       | 8 ++++----
 gremlin-driver/src/main/java/examples/ModernTraversals.java  | 2 +-
 gremlin-go/examples/basic_gremlin.go                         | 4 ++--
 gremlin-javascript/examples/basic-gremlin.js                 | 2 +-
 gremlin-javascript/examples/connections.js                   | 2 +-
 gremlin-javascript/examples/modern-traversals.js             | 2 +-
 gremlin-python/src/main/python/examples/basic_gremlin.py     | 2 +-
 gremlin-python/src/main/python/examples/connections.py       | 2 +-
 gremlin-python/src/main/python/examples/modern_traversals.py | 2 +-
 13 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/gremlin-dotnet/Examples/BasicGremlin/BasicGremlin.cs 
b/gremlin-dotnet/Examples/BasicGremlin/BasicGremlin.cs
index 9971ef1809..91820bfe09 100644
--- a/gremlin-dotnet/Examples/BasicGremlin/BasicGremlin.cs
+++ b/gremlin-dotnet/Examples/BasicGremlin/BasicGremlin.cs
@@ -27,7 +27,7 @@ public class BasicGremlinExample
     {
         var server = new GremlinServer("localhost", 8182);
         using var remoteConnection = new DriverRemoteConnection(new 
GremlinClient(server), "g");
-        var g = Traversal().With(remoteConnection);
+        var g = Traversal().WithRemote(remoteConnection);
 
         // Basic Gremlin: adding and retrieving data
         var v1 = g.AddV("person").Property("name", "marko").Next();
diff --git a/gremlin-dotnet/Examples/Connections/Connections.cs 
b/gremlin-dotnet/Examples/Connections/Connections.cs
index d5a4e648f8..26490f750b 100644
--- a/gremlin-dotnet/Examples/Connections/Connections.cs
+++ b/gremlin-dotnet/Examples/Connections/Connections.cs
@@ -36,7 +36,7 @@ public class ConnectionExample
     {
         var server = new GremlinServer("localhost", 8182);
         using var remoteConnection = new DriverRemoteConnection(new 
GremlinClient(server), "g");
-        var g = Traversal().With(remoteConnection);
+        var g = Traversal().WithRemote(remoteConnection);
 
         // Drop existing vertices
         g.V().Drop().Iterate();
diff --git a/gremlin-dotnet/Examples/ModernTraversals/ModernTraversals.cs 
b/gremlin-dotnet/Examples/ModernTraversals/ModernTraversals.cs
index b112254556..fab7073530 100644
--- a/gremlin-dotnet/Examples/ModernTraversals/ModernTraversals.cs
+++ b/gremlin-dotnet/Examples/ModernTraversals/ModernTraversals.cs
@@ -30,7 +30,7 @@ public class ModernTraversalExample
     {
         var server = new GremlinServer("localhost", 8182);
         using var remoteConnection = new DriverRemoteConnection(new 
GremlinClient(server), "g");
-        var g = Traversal().With(remoteConnection);
+        var g = Traversal().WithRemote(remoteConnection);
 
         /*
         This example requires the Modern toy graph to be preloaded upon 
launching the Gremlin server.
diff --git a/gremlin-driver/src/main/java/examples/BasicGremlin.java 
b/gremlin-driver/src/main/java/examples/BasicGremlin.java
index 46542a6e25..a5075d4606 100644
--- a/gremlin-driver/src/main/java/examples/BasicGremlin.java
+++ b/gremlin-driver/src/main/java/examples/BasicGremlin.java
@@ -31,7 +31,7 @@ import static 
org.apache.tinkerpop.gremlin.process.traversal.AnonymousTraversalS
 public class BasicGremlin {
     public static void main(String[] args) {
         Graph graph = TinkerGraph.open();
-        GraphTraversalSource g = traversal().with(graph);
+        GraphTraversalSource g = traversal().withEmbedded(graph);
 
         // Basic Gremlin: adding and retrieving data
         Vertex v1 = g.addV("person").property("name","marko").next();
diff --git a/gremlin-driver/src/main/java/examples/Connections.java 
b/gremlin-driver/src/main/java/examples/Connections.java
index d388cad824..458d5c8fd5 100644
--- a/gremlin-driver/src/main/java/examples/Connections.java
+++ b/gremlin-driver/src/main/java/examples/Connections.java
@@ -45,7 +45,7 @@ public class Connections {
     // Creating an embedded graph
     private static void withEmbedded() throws Exception {
         Graph graph = TinkerGraph.open();
-        GraphTraversalSource g = traversal().with(graph);
+        GraphTraversalSource g = traversal().withEmbedded(graph);
 
         g.addV().iterate();
         long count = g.V().count().next();
@@ -57,7 +57,7 @@ public class Connections {
     // Connecting to the server
     private static void withRemote() throws Exception {
         Cluster cluster = Cluster.build("localhost").port(8182).create();
-        GraphTraversalSource g = 
traversal().with(DriverRemoteConnection.using(cluster, "g"));
+        GraphTraversalSource g = 
traversal().withRemote(DriverRemoteConnection.using(cluster, "g"));
 
         // Drop existing vertices
         g.V().drop().iterate();
@@ -83,7 +83,7 @@ public class Connections {
             port(8182).
             serializer(new GraphBinaryMessageSerializerV1()).
             create();
-        GraphTraversalSource g = 
traversal().with(DriverRemoteConnection.using(cluster, "g"));
+        GraphTraversalSource g = 
traversal().withRemote(DriverRemoteConnection.using(cluster, "g"));
 
         g.addV().iterate();
         long count = g.V().count().next();
@@ -102,7 +102,7 @@ public class Connections {
             serializer(serializer).
             create();
         Client client = cluster.connect();
-        GraphTraversalSource g = 
traversal().with(DriverRemoteConnection.using(client, "g"));
+        GraphTraversalSource g = 
traversal().withRemote(DriverRemoteConnection.using(client, "g"));
 
         g.addV().iterate();
         long count = g.V().count().next();
diff --git a/gremlin-driver/src/main/java/examples/ModernTraversals.java 
b/gremlin-driver/src/main/java/examples/ModernTraversals.java
index cbaef5e5a8..c67b6daeb2 100644
--- a/gremlin-driver/src/main/java/examples/ModernTraversals.java
+++ b/gremlin-driver/src/main/java/examples/ModernTraversals.java
@@ -36,7 +36,7 @@ public class ModernTraversals {
     public static void main(String[] args) {
         // Performs basic traversals on the Modern toy graph which can be 
created using TinkerFactory
         Graph modern = TinkerFactory.createModern();
-        GraphTraversalSource g = traversal().with(modern);
+        GraphTraversalSource g = traversal().withEmbedded(modern);
 
         List<Edge> e1 = g.V(1).bothE().toList(); // (1)
         List<Edge> e2 = g.V(1).bothE().where(otherV().hasId(2)).toList(); // 
(2)
diff --git a/gremlin-go/examples/basic_gremlin.go 
b/gremlin-go/examples/basic_gremlin.go
index c4bb8e6c23..0ab2b1117f 100644
--- a/gremlin-go/examples/basic_gremlin.go
+++ b/gremlin-go/examples/basic_gremlin.go
@@ -32,7 +32,7 @@ func main() {
                return
        }
        defer driverRemoteConnection.Close()
-       g := gremlingo.Traversal_().With(driverRemoteConnection)
+       g := gremlingo.Traversal_().WithRemote(driverRemoteConnection)
 
        // Basic Gremlin: adding and retrieving data
        v1, err := g.AddV("person").Property("name", "marko").Next()
@@ -66,4 +66,4 @@ func main() {
        for _, person := range peopleMarkoKnows {
                fmt.Println("marko knows", person.GetString())
        }
-}
+}
\ No newline at end of file
diff --git a/gremlin-javascript/examples/basic-gremlin.js 
b/gremlin-javascript/examples/basic-gremlin.js
index bc412b356b..77e7f3b7d9 100644
--- a/gremlin-javascript/examples/basic-gremlin.js
+++ b/gremlin-javascript/examples/basic-gremlin.js
@@ -23,7 +23,7 @@ const DriverRemoteConnection = 
gremlin.driver.DriverRemoteConnection;
 
 async function main() {
     const dc = new DriverRemoteConnection('ws://localhost:8182/gremlin');
-    const g = traversal().with(dc);
+    const g = traversal().withRemote(dc);
 
     // Basic Gremlin: adding and retrieving data
     const v1 = await g.addV('person').property('name','marko').next();
diff --git a/gremlin-javascript/examples/connections.js 
b/gremlin-javascript/examples/connections.js
index 4264ec5471..183f6404f6 100644
--- a/gremlin-javascript/examples/connections.js
+++ b/gremlin-javascript/examples/connections.js
@@ -30,7 +30,7 @@ async function main() {
 async function withRemote() {
     // Connecting to the server
     const dc = new DriverRemoteConnection('ws://localhost:8182/gremlin');
-    const g = traversal().with(dc);
+    const g = traversal().withRemote(dc);
 
     // Drop existing vertices
     await g.V().drop().iterate();
diff --git a/gremlin-javascript/examples/modern-traversals.js 
b/gremlin-javascript/examples/modern-traversals.js
index dfac46a080..66b039fca3 100644
--- a/gremlin-javascript/examples/modern-traversals.js
+++ b/gremlin-javascript/examples/modern-traversals.js
@@ -31,7 +31,7 @@ async function main() {
     conf/gremlin-server-modern.yaml.
     */
     const dc = new DriverRemoteConnection('ws://localhost:8182/gremlin');
-    const g = traversal().with(dc);
+    const g = traversal().withRemote(dc);
 
     const e1 = await g.V(1).bothE().toList(); // (1)
     const e2 = await g.V(1).bothE().where(__.otherV().hasId(2)).toList(); // 
(2)
diff --git a/gremlin-python/src/main/python/examples/basic_gremlin.py 
b/gremlin-python/src/main/python/examples/basic_gremlin.py
index 1dfe75be4d..256ed98441 100644
--- a/gremlin-python/src/main/python/examples/basic_gremlin.py
+++ b/gremlin-python/src/main/python/examples/basic_gremlin.py
@@ -26,7 +26,7 @@ from gremlin_python.driver.driver_remote_connection import 
DriverRemoteConnectio
 
 def main():
     rc = DriverRemoteConnection('ws://localhost:8182/gremlin', 'g')
-    g = traversal().with_(rc)
+    g = traversal().with_remote(rc)
 
     # basic Gremlin: adding and retrieving data
     v1 = g.add_v('person').property('name', 'marko').next()
diff --git a/gremlin-python/src/main/python/examples/connections.py 
b/gremlin-python/src/main/python/examples/connections.py
index dd9fd6a163..f268e6c27d 100644
--- a/gremlin-python/src/main/python/examples/connections.py
+++ b/gremlin-python/src/main/python/examples/connections.py
@@ -41,7 +41,7 @@ def with_remote():
     # which starts it in "console" mode with an empty in-memory TinkerGraph 
ready to go bound to a
     # variable named "g" as referenced in the following line.
     rc = DriverRemoteConnection('ws://localhost:8182/gremlin', 'g')
-    g = traversal().with_(rc)
+    g = traversal().with_remote(rc)
 
     # drop existing vertices
     g.V().drop().iterate()
diff --git a/gremlin-python/src/main/python/examples/modern_traversals.py 
b/gremlin-python/src/main/python/examples/modern_traversals.py
index 32b4e1fb20..ae757b10b4 100644
--- a/gremlin-python/src/main/python/examples/modern_traversals.py
+++ b/gremlin-python/src/main/python/examples/modern_traversals.py
@@ -32,7 +32,7 @@ def main():
     # For details, see 
https://tinkerpop.apache.org/docs/current/reference/#gremlin-server-docker-image
 and use
     # conf/gremlin-server-modern.yaml.
     rc = DriverRemoteConnection('ws://localhost:8182/gremlin', 'g')
-    g = traversal().with_(rc)
+    g = traversal().with_remote(rc)
 
     e1 = g.V(1).both_e().to_list()  # (1)
     e2 = g.V(1).both_e().where(__.other_v().has_id(2)).to_list()  # (2)

Reply via email to