查看版本:
gremlin> Gremlin.version
1、添加顶点
v1 = graph.addVertex(label, "person", "name", "one", "age", 20)
v2 = graph.addVertex(label, "person", "name", "two", "age", 30)
2、添加边
v1.addEdge("created", v2, "weight", 4)
3、查看标签
g.V().has('name','two').label()
4、通过标签过滤
g.V().hasLabel("person").values()
5、
参考资料:
(1)http://tinkerpop.apache.org/docs/current/reference