Skip to content

Instantly share code, notes, and snippets.

@espeed
Created November 14, 2011 15:20
Show Gist options
  • Save espeed/1364151 to your computer and use it in GitHub Desktop.
Save espeed/1364151 to your computer and use it in GitHub Desktop.
Gremlin Library: YAML
save_graphml: |
g.saveGraphML('data/graphml')
new File('data/graphml').getText()
load_graphml: |
g.loadGraphML($uri)
get_all_vertices: |
g.V
get_all_edges: |
g.E
outE: |
g.v($_id).outE($label)
inE: |
g.v($_id).inE($label)
bothE: |
g.v($_id).bothE($label)
outV: |
g.v($_id).outV($label)
inV: |
g.v($_id).inV($label)
bothV: |
g.v($_id).bothV($label)
rebuild_vertex_index: |
index = g.getIndex('$index_name',Vertex)
AutomaticIndexHelper.reIndexElements(g, index, g.getVertices())
rebuild_edge_index: |
index = g.getIndex('$index_name',Edge)
AutomaticIndexHelper.reIndexElements(g, index, g.getEdges())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment