arangosh> db._create("vertex");
[ArangoCollection 7494, "vertex" (type document, status loaded)]
arangosh> db._createEdgeCollection("relation");
[ArangoCollection 7497, "relation" (type edge, status loaded)]
arangosh> myGraph.v1 = db.vertex.insert({ name : "vertex 1" });
{
"_id" : "vertex/7501",
"_key" : "7501",
"_rev" : "_XiAwGIy--_"
}
arangosh> myGraph.v2 = db.vertex.insert({ name : "vertex 2" });
{
"_id" : "vertex/7505",
"_key" : "7505",
"_rev" : "_XiAwGI2--_"
}
arangosh> myGraph.e1 = db.relation.insert(myGraph.v1, myGraph.v2,
........> { label : "knows"});
{
"_id" : "relation/7508",
"_key" : "7508",
"_rev" : "_XiAwGI2--B"
}
arangosh> db._document(myGraph.e1);
{
"_key" : "7508",
"_id" : "relation/7508",
"_from" : "vertex/7501",
"_to" : "vertex/7505",
"_rev" : "_XiAwGI2--B",
"label" : "knows"
}
arangosh> db.relation.outEdges(myGraph.v1._id);
[
{
"_key" : "7508",
"_id" : "relation/7508",
"_from" : "vertex/7501",
"_to" : "vertex/7505",
"_rev" : "_XiAwGI2--B",
"label" : "knows"
}
]
arangosh> db.relation.outEdges(myGraph.v2._id);
[ ]