Skip to content

Instantly share code, notes, and snippets.

@spmallette
Created June 15, 2012 21:11
Show Gist options
  • Save spmallette/2938719 to your computer and use it in GitHub Desktop.
Save spmallette/2938719 to your computer and use it in GitHub Desktop.
gremlin> g = new Neo4jGraph('/tmp/neo4jtesting/')
==>neo4jgraph[EmbeddedGraphDatabase [C:\tmp\neo4jtesting]]
gremlin> g.createKeyIndex("test", Vertex.class)
==>null
gremlin> v = ['a','b','c','d','e','f','g']
==>a
==>b
==>c
==>d
==>e
==>f
==>g
gremlin> for (val in v) {g.addVertex(['type':'test', 'test':val])}
==>null
gremlin> g.getVertices('test', 'c').iterator().toList()
==>v[3]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment