1
0
Fork 0
arangodb/Documentation/Examples/GRAPHTRAV_01_create_graph.g...

178 lines
3.7 KiB
Plaintext

arangosh> var examples = require("@arangodb/graph-examples/example-graph.js");
arangosh> var graph = examples.loadGraph("traversalGraph");
arangosh> db.circles.toArray();
[
{
"_key" : "I",
"_id" : "circles/I",
"_rev" : "_XoI6n9y--B",
"label" : "9"
},
{
"_key" : "G",
"_id" : "circles/G",
"_rev" : "_XoI6n9u--B",
"label" : "7"
},
{
"_key" : "F",
"_id" : "circles/F",
"_rev" : "_XoI6n9u--_",
"label" : "6"
},
{
"_key" : "A",
"_id" : "circles/A",
"_rev" : "_XoI6n9m--_",
"label" : "1"
},
{
"_key" : "E",
"_id" : "circles/E",
"_rev" : "_XoI6n9q--D",
"label" : "5"
},
{
"_key" : "C",
"_id" : "circles/C",
"_rev" : "_XoI6n9q--_",
"label" : "3"
},
{
"_key" : "D",
"_id" : "circles/D",
"_rev" : "_XoI6n9q--B",
"label" : "4"
},
{
"_key" : "J",
"_id" : "circles/J",
"_rev" : "_XoI6n9y--D",
"label" : "10"
},
{
"_key" : "B",
"_id" : "circles/B",
"_rev" : "_XoI6n9m--B",
"label" : "2"
},
{
"_key" : "H",
"_id" : "circles/H",
"_rev" : "_XoI6n9y--_",
"label" : "8"
},
{
"_key" : "K",
"_id" : "circles/K",
"_rev" : "_XoI6n92--_",
"label" : "11"
}
]
arangosh> db.edges.toArray();
[
{
"_key" : "98585",
"_id" : "edges/98585",
"_from" : "circles/A",
"_to" : "circles/B",
"_rev" : "_XoI6n92--B",
"theFalse" : false,
"theTruth" : true,
"label" : "left_bar"
},
{
"_key" : "98595",
"_id" : "edges/98595",
"_from" : "circles/B",
"_to" : "circles/E",
"_rev" : "_XoI6n96--B",
"theFalse" : false,
"theTruth" : true,
"label" : "left_blub"
},
{
"_key" : "98601",
"_id" : "edges/98601",
"_from" : "circles/A",
"_to" : "circles/G",
"_rev" : "_XoI6o----_",
"theFalse" : false,
"theTruth" : true,
"label" : "right_foo"
},
{
"_key" : "98598",
"_id" : "edges/98598",
"_from" : "circles/E",
"_to" : "circles/F",
"_rev" : "_XoI6n96--D",
"theFalse" : false,
"theTruth" : true,
"label" : "left_schubi"
},
{
"_key" : "98607",
"_id" : "edges/98607",
"_from" : "circles/H",
"_to" : "circles/I",
"_rev" : "_XoI6o-C--_",
"theFalse" : false,
"theTruth" : true,
"label" : "right_blub"
},
{
"_key" : "98604",
"_id" : "edges/98604",
"_from" : "circles/G",
"_to" : "circles/H",
"_rev" : "_XoI6o----B",
"theFalse" : false,
"theTruth" : true,
"label" : "right_blob"
},
{
"_key" : "98589",
"_id" : "edges/98589",
"_from" : "circles/B",
"_to" : "circles/C",
"_rev" : "_XoI6n92--D",
"theFalse" : false,
"theTruth" : true,
"label" : "left_blarg"
},
{
"_key" : "98592",
"_id" : "edges/98592",
"_from" : "circles/C",
"_to" : "circles/D",
"_rev" : "_XoI6n96--_",
"theFalse" : false,
"theTruth" : true,
"label" : "left_blorg"
},
{
"_key" : "98610",
"_id" : "edges/98610",
"_from" : "circles/G",
"_to" : "circles/J",
"_rev" : "_XoI6o-C--B",
"theFalse" : false,
"theTruth" : true,
"label" : "right_zip"
},
{
"_key" : "98613",
"_id" : "edges/98613",
"_from" : "circles/J",
"_to" : "circles/K",
"_rev" : "_XoI6o-C--D",
"theFalse" : false,
"theTruth" : true,
"label" : "right_zup"
}
]
arangosh> print("once you don't need them anymore, clean them up:");
once you don't need them anymore, clean them up:
arangosh> examples.dropGraph("traversalGraph");