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

commit 0d43110833230100394aa0593f925967cac170c0
Merge: 6405e102ae 6fbafc436c
Author: Cole-Greer <cole.gr...@improving.com>
AuthorDate: Thu Dec 14 14:55:51 2023 -0800

    Merge branch '3.7-dev'

 bin/run-examples.sh                                | 119 ++++++++
 docs/src/dev/developer/release.asciidoc            |   1 +
 docs/src/reference/gremlin-variants.asciidoc       | 170 +++++++++--
 .../Examples/BasicGremlin/BasicGremlin.cs          |  54 ++++
 .../Examples/BasicGremlin/BasicGremlin.csproj      |  30 ++
 gremlin-dotnet/Examples/Connections/Connections.cs |  74 +++++
 .../Examples/Connections/Connections.csproj        |  30 ++
 gremlin-dotnet/Examples/Examples.sln               |  37 +++
 .../Examples/ModernTraversals/ModernTraversals.cs  |  71 +++++
 .../ModernTraversals/ModernTraversals.csproj       |  30 ++
 gremlin-driver/pom.xml                             |   9 +
 .../src/main/java/examples/BasicGremlin.java       |  56 ++++
 .../src/main/java/examples/Connections.java        | 116 ++++++++
 .../src/main/java/examples/ModernTraversals.java   |  71 +++++
 gremlin-driver/src/main/java/examples/pom.xml      |  91 ++++++
 gremlin-go/example/go.sum                          | 315 ---------------------
 gremlin-go/examples/basic_gremlin.go               |  69 +++++
 .../example.go => examples/connections.go}         |  55 ++--
 gremlin-go/{example => examples}/go.mod            |   8 +-
 gremlin-go/examples/go.sum                         |  44 +++
 gremlin-go/examples/modern_traversals.go           |  77 +++++
 gremlin-javascript/examples/.gitignore             |   1 +
 gremlin-javascript/examples/basic-gremlin.js       |  51 ++++
 gremlin-javascript/examples/connections.js         |  65 +++++
 gremlin-javascript/examples/modern-traversals.js   |  69 +++++
 gremlin-javascript/examples/package-lock.json      |  47 +++
 gremlin-javascript/examples/package.json           |  14 +
 gremlin-python/src/main/python/example.py          |  52 ----
 .../src/main/python/examples/basic_gremlin.py      |  54 ++++
 .../src/main/python/examples/connections.py        | 101 +++++++
 .../src/main/python/examples/modern_traversals.py  |  69 +++++
 .../src/main/python/examples/requirements.txt      |  29 ++
 32 files changed, 1675 insertions(+), 404 deletions(-)

diff --cc gremlin-go/examples/connections.go
index ec2652191c,3e1f1de174..284720ab44
--- a/gremlin-go/examples/connections.go
+++ b/gremlin-go/examples/connections.go
@@@ -21,21 -21,20 +21,18 @@@ package mai
  
  import (
        "fmt"
-       gremlingo "github.com/apache/tinkerpop/gremlin-go/driver"
 -
--      "github.com/apache/tinkerpop/gremlin-go/v3/driver"
  )
  
- // syntactic sugar
- var __ = gremlingo.T__
- var gt = gremlingo.P.Gt
- var order = gremlingo.Order
- 
  func main() {
-       // Creating the connection to the server.
-       driverRemoteConnection, err := 
gremlingo.NewDriverRemoteConnection("ws://localhost:8182/gremlin",
-               func(settings *gremlingo.DriverRemoteConnectionSettings) {
-                       settings.TraversalSource = "gmodern"
-               })
+       withRemote()
+       withConfigs()
+ }
+ 
+ func withRemote() {
 -    // Creating the connection to the server
 -    driverRemoteConnection, err := 
gremlingo.NewDriverRemoteConnection("ws://localhost:8182/gremlin")
++      // Creating the connection to the server
++      driverRemoteConnection, err := 
gremlingo.NewDriverRemoteConnection("ws://localhost:8182/gremlin")
+ 
+       // Error handling
        if err != nil {
                fmt.Println(err)
                return
@@@ -43,16 -43,39 +41,39 @@@
        // Cleanup
        defer driverRemoteConnection.Close()
  
 -    // Creating the graph traversal
 -      g := gremlingo.Traversal_().WithRemote(driverRemoteConnection)
 +      // Creating graph traversal
 +      g := gremlingo.Traversal_().With(driverRemoteConnection)
  
-       // Perform traversal
-       result, err := g.V().HasLabel("person").Has("age", 
__.Is(gt(28))).Order().By("age", order.Desc).Values("name").ToList()
 -    // Drop existing vertices
 -    prom := g.V().Drop().Iterate()
 -    <-prom
++      // Drop existing vertices
++      prom := g.V().Drop().Iterate()
++      <-prom
+ 
 -    // Simple query to verify connection
 -    g.AddV().Iterate()
 -    count, _ := g.V().Count().Next()
 -    fmt.Println("Vertex count:", *count)
++      // Simple query to verify connection
++      g.AddV().Iterate()
++      count, _ := g.V().Count().Next()
++      fmt.Println("Vertex count:", *count)
+ }
+ 
+ func withConfigs() {
+       // Connecting to the server with customized configurations
+       driverRemoteConnection, err := 
gremlingo.NewDriverRemoteConnection("ws://localhost:8182/gremlin",
+               func(settings *gremlingo.DriverRemoteConnectionSettings) {
+                       settings.TraversalSource = "g"
+                       settings.NewConnectionThreshold = 4
+                       settings.EnableCompression = false
+                       settings.ReadBufferSize = 0
+                       settings.WriteBufferSize = 0
+               })
+ 
        if err != nil {
                fmt.Println(err)
                return
        }
-       for _, r := range result {
-               fmt.Println(r.GetString())
-       }
+ 
+       defer driverRemoteConnection.Close()
+       g := gremlingo.Traversal_().WithRemote(driverRemoteConnection)
+ 
 -    g.AddV().Iterate()
 -    count, _ := g.V().Count().Next()
 -    fmt.Println("Vertex count:", *count)
 -}
++      g.AddV().Iterate()
++      count, _ := g.V().Count().Next()
++      fmt.Println("Vertex count:", *count)
 +}

Reply via email to