schema.vertexLabel("Customer").
ifNotExists().
partitionBy("name", Text).
create();
schema.vertexLabel("Car").
ifNotExists().
partitionBy("name", Text).
create();
schema.edgeLabel('rent').
ifNotExists().
from('Customer').to('Car').
create()
schema.edgeLabel('own').
ifNotExists().
from('Customer').to('Car').
create()
taro = g.addV("Customer").
property("name", "Taro").
next();
jiro = g.addV("Customer").
property("name", "Jiro").
next();
toyota = g.addV("Car").
property("name", "Toyota").
next();
g.addE("own").
from(taro).
to(toyota).
next();
g.addE("rent").
from(jiro).
to(toyota).
next();
dev.V()
Last active
May 11, 2020 15:04
-
-
Save mzsima/d57bbb049af694f8a768853f16b5f593 to your computer and use it in GitHub Desktop.
二郎は太郎から車を借りる
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment