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" : "_XUJy0ve--D",
"label" : "9"
},
{
"_key" : "G",
"_id" : "circles/G",
"_rev" : "_XUJy0ve--_",
"label" : "7"
},
{
"_key" : "F",
"_id" : "circles/F",
"_rev" : "_XUJy0va--F",
"label" : "6"
},
{
"_key" : "A",
"_id" : "circles/A",
"_rev" : "_XUJy0vW--_",
"label" : "1"
},
{
"_key" : "E",
"_id" : "circles/E",
"_rev" : "_XUJy0va--D",
"label" : "5"
},
{
"_key" : "C",
"_id" : "circles/C",
"_rev" : "_XUJy0va--_",
"label" : "3"
},
{
"_key" : "D",
"_id" : "circles/D",
"_rev" : "_XUJy0va--B",
"label" : "4"
},
{
"_key" : "J",
"_id" : "circles/J",
"_rev" : "_XUJy0vi--_",
"label" : "10"
},
{
"_key" : "B",
"_id" : "circles/B",
"_rev" : "_XUJy0vW--B",
"label" : "2"
},
{
"_key" : "H",
"_id" : "circles/H",
"_rev" : "_XUJy0ve--B",
"label" : "8"
},
{
"_key" : "K",
"_id" : "circles/K",
"_rev" : "_XUJy0vi--B",
"label" : "11"
}
]
arangosh> db.edges.toArray();
[
{
"_key" : "97941",
"_id" : "edges/97941",
"_from" : "circles/A",
"_to" : "circles/G",
"_rev" : "_XUJy0vm--F",
"theFalse" : false,
"theTruth" : true,
"label" : "right_foo"
},
{
"_key" : "97932",
"_id" : "edges/97932",
"_from" : "circles/C",
"_to" : "circles/D",
"_rev" : "_XUJy0vm--_",
"theFalse" : false,
"theTruth" : true,
"label" : "left_blorg"
},
{
"_key" : "97935",
"_id" : "edges/97935",
"_from" : "circles/B",
"_to" : "circles/E",
"_rev" : "_XUJy0vm--B",
"theFalse" : false,
"theTruth" : true,
"label" : "left_blub"
},
{
"_key" : "97925",
"_id" : "edges/97925",
"_from" : "circles/A",
"_to" : "circles/B",
"_rev" : "_XUJy0vi--D",
"theFalse" : false,
"theTruth" : true,
"label" : "left_bar"
},
{
"_key" : "97947",
"_id" : "edges/97947",
"_from" : "circles/H",
"_to" : "circles/I",
"_rev" : "_XUJy0vq--B",
"theFalse" : false,
"theTruth" : true,
"label" : "right_blub"
},
{
"_key" : "97944",
"_id" : "edges/97944",
"_from" : "circles/G",
"_to" : "circles/H",
"_rev" : "_XUJy0vq--_",
"theFalse" : false,
"theTruth" : true,
"label" : "right_blob"
},
{
"_key" : "97953",
"_id" : "edges/97953",
"_from" : "circles/J",
"_to" : "circles/K",
"_rev" : "_XUJy0vu--_",
"theFalse" : false,
"theTruth" : true,
"label" : "right_zup"
},
{
"_key" : "97938",
"_id" : "edges/97938",
"_from" : "circles/E",
"_to" : "circles/F",
"_rev" : "_XUJy0vm--D",
"theFalse" : false,
"theTruth" : true,
"label" : "left_schubi"
},
{
"_key" : "97950",
"_id" : "edges/97950",
"_from" : "circles/G",
"_to" : "circles/J",
"_rev" : "_XUJy0vq--D",
"theFalse" : false,
"theTruth" : true,
"label" : "right_zip"
},
{
"_key" : "97929",
"_id" : "edges/97929",
"_from" : "circles/B",
"_to" : "circles/C",
"_rev" : "_XUJy0vi--F",
"theFalse" : false,
"theTruth" : true,
"label" : "left_blarg"
}
]
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");