mirror of https://gitee.com/bigwinds/arangodb
20 lines
408 B
Plaintext
20 lines
408 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.getPropertyKeys()
|
|
[ "weight" ]
|
|
|
|
avocado> e.setProperty("name", "Hugo");
|
|
Hugo
|
|
|
|
avocado> e.getPropertyKeys()
|
|
[ "weight", "name" ]
|