This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// You can run this code in a Gremlin shell. Tested with Tinkerpop 2.4.0 | |
// A sample graph -- See https://github.com/tinkerpop/blueprints/wiki/Property-Graph-Model | |
g = TinkerGraphFactory.createTinkerGraph() | |
// The schema for the sample graph -- See http://lambdazen.blogspot.com/2014/01/do-property-graphs-have-schemas.html | |
sg = new TinkerGraph() | |
person = sg.addVertex() | |
person.setProperty('_label', 'person') | |
person.setProperty('name', 'java.lang.String') | |
person.setProperty('age', 'java.lang.Integer') |