mirror of https://gitee.com/bigwinds/arangodb
15 lines
433 B
Plaintext
15 lines
433 B
Plaintext
arangosh> Graph = require("org/arangodb/graph-blueprint").Graph;
|
|
function (name, vertices, edges, waitForSync) {
|
|
this.initialize(name, vertices, edges, waitForSync);
|
|
}
|
|
arangosh> g = new Graph("example", "v", "e");
|
|
Graph("example")
|
|
arangosh> v1 = g.addVertex("1");
|
|
Vertex("1")
|
|
arangosh> v2 = g.addVertex("2");
|
|
Vertex("2")
|
|
arangosh> e = g.addEdge(v1, v2, "1-to-2", "knows");
|
|
Edge("1-to-2")
|
|
arangosh> e.getPeerVertex(v1);
|
|
Vertex("2")
|