Skip to content

Instantly share code, notes, and snippets.

@spmallette
Created September 6, 2012 10:33
Show Gist options
  • Save spmallette/3654599 to your computer and use it in GitHub Desktop.
Save spmallette/3654599 to your computer and use it in GitHub Desktop.
gremlin> g = new OrientGraph("local:/tmp/orient")
==>orientgraph[local:/tmp/orient]
gremlin> g.createKeyIndex("list", Vertex.class)
==>null
gremlin> g.stopTransaction(SUCCESS)
==>null
gremlin> v1 = g.addVertex()
==>v[#6:-2]
gremlin> v2 = g.addVertex()
==>v[#6:-3]
gremlin> v3 = g.addVertex()
==>v[#6:-4]
gremlin> v1.setProperty("list", [1, 2, 3, 4, 5])
==>null
gremlin> v2.setProperty("list", [2, 4, 6, 8, 10])
==>null
gremlin> v3.setProperty("list", "nothing")
==>null
gremlin> g.stopTransaction(SUCCESS)
==>null
gremlin> g.V
==>v[#6:0]
==>v[#6:1]
==>v[#6:2]
gremlin> g.V("list", 1)
gremlin> g.V("list", "nothing")
==>v[#6:2]
gremlin> g.V("list", [1,2,3,4,5])
==>v[#6:0]
gremlin> g.V("list", [1])
gremlin> g.V("list", [5,4,3,2,1])
gremlin>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment