Skip to content

Instantly share code, notes, and snippets.

@bassem-mf
bassem-mf / GettingStartedTutorial3Commands.txt
Created October 23, 2020 21:50
Getting Started With Graph Databases, Apache TinkerPop, and Gremlin - Tutorial 3
// 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')
@bassem-mf
bassem-mf / GettingStartedTutorial2Commands.txt
Created October 13, 2020 04:38
Getting Started With Graph Databases, Apache TinkerPop, and Gremlin - Tutorial 2
// Create an empty graph database
graph = TinkerGraph.open()
// Create the TraversalSource
g = graph.traversal()
// Create the "person" vertex and assign it to "v1"
@bassem-mf
bassem-mf / GettingStartedTutorial1Commands.txt
Last active May 28, 2024 16:09
Getting Started With Graph Databases, Apache TinkerPop, and Gremlin - Tutorial 1
// Create an instance of the "Modern" toy graph
graph = TinkerFactory.createModern()
// Create the traversal source
g = graph.traversal()
// Get all vertices