mirror of https://gitee.com/bigwinds/arangodb
17 lines
385 B
Plaintext
17 lines
385 B
Plaintext
avocado> var Graph = require("graph").Graph;
|
|
|
|
avocado> g = new Graph("vertices", "edges");
|
|
Graph("vertices", "edges")
|
|
|
|
avocado> v1 = g.addVertex();
|
|
Vertex(<graph>, "153246:2310672")
|
|
|
|
avocado> v2 = g.addVertex();
|
|
Vertex(<graph>, "153246:2310673")
|
|
|
|
avocado> e = g.addEdge(v1, v2, "knows", { "weight" : 10 });
|
|
Edge(<graph>, "3999653:5570857")
|
|
|
|
avocado> e.properties(e);
|
|
{ "weight" : 10 }
|