execute-bound-string

command
v1.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

README

execute-bound-string

The basics of executing Gremlin queries that are bound using the ExecuteBoundStringQuery function in the Grammes client.

Description

execute-bound-string demonstrates how to execute Gremlin queries that are bound. Specifically this example shows how to execute them using the ExecuteBoundStringQuery function in the Grammes client which takes in a string query, bindings and re-bindings as map[string]string. Then returns a []byte and error. The []byte can be used to unmarshal into any kind of expected result such as a list of vertices.

Prerequisites

  • go 1.12
  • Git
  • Elastic Search
  • Cassandra
    • Java 8

Running

To run this test you will need a TinkerPop server running and a graph database to connect to locally. This example was tested while using JanusGraph which can be used by locating yourself to the root directory of the Grammes project.

cd $GOPATH/src/github.com/betty-labs/grammes

After locating yourself here then you may change directory to the /scripts folder.

cd scripts

Finally you may run the janusgraph.sh script to begin a local instance of JanusGraph. This will begin the TinkerPop server for you as well.

./janusgraph.sh

For further instructions please find yourself to the root README.md file.

Steps

General steps
  • Create a zap logger to help explain what's going on in the test and display the results.
  • Creates a Grammes client that connects to a locally hosted TinkerPop server with a WebSocket.
    • For testing this was created using JanusGraph. This can be run in the /scripts directory.
  • Drop all of the possible interfering vertices that were already on the graph.
  • Defer a drop of all the testing vertices. This is done as clean up.

Test specific steps
  • Adds a vertex to the graph using a string query and bindings

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL