Skip to content

Instantly share code, notes, and snippets.

@mzsima
Last active May 20, 2020 16:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mzsima/11f3196bd4cfefefe296e1d58730e7ff to your computer and use it in GitHub Desktop.
Save mzsima/11f3196bd4cfefefe296e1d58730e7ff to your computer and use it in GitHub Desktop.
Cのコードはドミソ

image

snapshot

code gremlin

schema.vertexLabel("Key").ifNotExists().partitionBy("name", Text).create();
schema.vertexLabel("Code").ifNotExists().partitionBy("name", Text).create();
schema.edgeLabel('hit').ifNotExists().from('Code').to('Key').create()
  
  
keyC = g.addV("Key").property("name", "ド").next();
keyE = g.addV("Key").property("name", "ミ").next();
keyG = g.addV("Key").property("name", "ソ").next();
codeC = g.addV("Code").property("name", "C").next();

g.addE("hit").from(codeC).to(keyC).next();
g.addE("hit").from(codeC).to(keyE).next();
g.addE("hit").from(codeC).to(keyG).next();

dev.V()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment