-
Notifications
You must be signed in to change notification settings - Fork 29
Tinkerpop gremlin cheat sheet
Graph graph = TinkerGraph.open();
graph_store = TitanFactory.open('berkeleyje:/tmp/graph')
mgr.makePropertyKey("v_value").dataType(String.class).make()
mgr = graph_store.openManagement() keyV = mgr.getPropertyKey("v_value") mgr.buildIndex("vertices", Vertex.class).addKey(keyV).buildCompositeIndex() mgr.commit()
import com.thinkaurelius.titan.graphdb.database.management.ManagementSystem mgr = graph_store.openManagement() ManagementSystem.awaitGraphIndexStatus(graph_store, "vertices").status(SchemaStatus.REGISTERED).call() mgr.updateIndex(mgr.getGraphIndex("vertices"), SchemaAction.REINDEX).get()
graph.getOpenTransactions() commit opened transactions
txs = graph_store.getOpenTransactions()
txs.forEach( a -> a.commit() ) `
v1 = graph_store.addVertex(T.label, "Type1", "v_value", sb.toString())
`$ ~/Developpement/apache-tinkerpop-gremlin-console-3.2.4/bin/gremlin.sh
path="path_to_db_root" g = Neo4jGraph.open(path)
`