Skip to content

Instantly share code, notes, and snippets.

@mzsima
Created May 14, 2020 14:44
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/36c101fb7f13b04c4d8ec21acaad12b3 to your computer and use it in GitHub Desktop.
Save mzsima/36c101fb7f13b04c4d8ec21acaad12b3 to your computer and use it in GitHub Desktop.
太郎は京都にでかける

image

snapshot

gremlin code

schema.vertexLabel("Customer").
       ifNotExists().
       partitionBy("name", Text).
       create();

schema.vertexLabel("Place").
       ifNotExists().
       partitionBy("name", Text).
       create();

schema.edgeLabel('trip').
  ifNotExists().
  from('Customer').to('Place').
  create()
  

taro = g.addV("Customer").
        property("name", "Taro").
        next();
        
kyoto = g.addV("Place").
    property("name", "Kyoto").
    next();
        
g.addE("trip").
    from(taro).
    to(kyoto).
    next();

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