schema.vertexLabel("Customer").
ifNotExists().
partitionBy("name", Text).
create();
schema.vertexLabel("Bank").
ifNotExists().
partitionBy("name", Text).
create();
schema.vertexLabel("Transaction").
ifNotExists().
partitionBy("price", Int).
create();
schema.edgeLabel('deposit').
ifNotExists().
from('Transaction').to('Bank').
create()
schema.edgeLabel('save').
ifNotExists().
from('Customer').to('Transaction').
create()
taro = g.addV("Customer").
property("name", "Taro").
next();
piggy = g.addV("Bank").
property("name", "Piggy").
next();
t = g.addV("Transaction").
property("price", 100).
next();
g.addE("save").
from(taro).
to(t).
next();
g.addE("deposit").
from(t).
to(piggy).
next();
dev.V()
Last active
May 13, 2020 14:40
-
-
Save mzsima/79aedb09ea3756d3bacb3c4afb878636 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