Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 1.45 KB

README.md

File metadata and controls

34 lines (23 loc) · 1.45 KB

neo4j-gremlin-bolt

Build Status

Graph API

This project allows the use of the Apache Tinkerpop Java API with the neo4j server.

Working with Vertices and Edges

Create a Vertex

Create a new Vertex in the current graph call the Graph.addVertex() method.

  // create a vertex in current graph
  Vertex vertex = graph.addVertex();

Create a new Vertex in the current graph with some property values:

  // create a vertex in current graph with property values
  Vertex vertex = graph.addVertex("name", "John", "age", 50);

Create a new Vertex in the current graph with a Label:

  // create a vertex in current graph with label
  Vertex vertex1 = graph.addVertex("Person");
  // create another vertex in current graph with label
  Vertex vertex2 = graph.addVertex(T.label, "Company");