This file contains 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
// Create an instance of the "Modern" toy graph | |
graph = TinkerFactory.createModern() | |
// Create the traversal source | |
g = graph.traversal() | |
// Get all vertices |
This file contains 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
// Create an empty graph database | |
graph = TinkerGraph.open() | |
// Create the TraversalSource | |
g = graph.traversal() | |
// Create the "person" vertex and assign it to "v1" |
This file contains 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
// Create an instance of the "Modern" toy graph and the traversal source in | |
// one command | |
g = TinkerFactory.createModern().traversal() | |
// Get the "age" values of the two "person"s named "vadas" and "marko" | |
g.V()\ | |
.has('person', 'name', within('vadas','marko'))\ | |
.values('age') |