Skip to content

Instantly share code, notes, and snippets.

@mzsima
Last active May 5, 2020 14:25
Show Gist options
  • Save mzsima/ce9578f4c9167a312c5535b074824afb to your computer and use it in GitHub Desktop.
Save mzsima/ce9578f4c9167a312c5535b074824afb to your computer and use it in GitHub Desktop.
Taro が Jiro を follow

イメージ

Screen Shot 2020-05-05 at 23 20 29

--------------------NOTEBOOK_taro_jiro_follow--------------------
--------------------CELL_GREMLIN_1--------------------
schema.vertexLabel("Customer").
ifNotExists().
partitionBy("customer_id", Text).
property("name", Text).
create();
schema.edgeLabel('follow').
ifNotExists().
from('Customer').to('Customer').
create()
--------------------CELL_GREMLIN_2--------------------
taro = g.addV("Customer").
property("customer_id", "customer_0").
property("name", "Taro").
next();
jiro = g.addV("Customer").
property("customer_id", "customer_1").
property("name", "Jiro").
next();
g.addE("follow").
from(taro).
to(jiro).
next();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment