mirror of https://gitee.com/bigwinds/arangodb
20 lines
382 B
Plaintext
20 lines
382 B
Plaintext
avocado> var Graph = require("graph").Graph;
|
|
|
|
avocado> g = new Graph("vertices", "edges");
|
|
Graph("vertices", "edges")
|
|
|
|
avocado> v = g.addVertex();
|
|
Vertex(<graph>, "153246:2310672")
|
|
|
|
avocado> e = g.addEdge(v, v, "self", { weight: 10 })
|
|
Edge(<graph>, "2141724:6339989")
|
|
|
|
avocado> e.getPropert("weight")
|
|
10
|
|
|
|
avocado> e.setProperty("weight", 20);
|
|
20
|
|
|
|
avocado> e.getPropert("weight")
|
|
20
|