Cycles in Gremlin/Cypher
问题 I'm making a presentation about how some elements looks in Neo4j's Cypher and Titan's Gremlin i.e. add new vertex, look for relation etc. I have a problem with looking for cyclec. Is there any function in these 2 languages which can return a cycles i.e. for given vertex? 回答1: Here's how you do it in Gremlin: gremlin> g = TinkerGraphFactory.createTinkerGraph() ==>tinkergraph[vertices:6 edges:6] gremlin> g.v(2).addEdge("knows", g.v(6)) ==>e[0][2-knows->6] gremlin> g.v(6).addEdge("knows", g.v(1)