1
0
Fork 0
arangodb/Documentation/Examples/generalGraphModuleNeighbors...

48 lines
1.1 KiB
Plaintext

arangosh> var examples = require("org/arangodb/graph-examples/example-graph.js");
arangosh> var graph = examples.loadGraph("routeplanner");
arangosh> graph._neighbors('germanCity/Hamburg', {direction : 'outbound', maxDepth : 2});
[
{
"_id" : "germanCity/Cologne",
"_key" : "Cologne",
"_rev" : "587228610",
"isCapital" : false,
"population" : 1000000
},
{
"_id" : "frenchCity/Lyon",
"_key" : "Lyon",
"_rev" : "587818434",
"isCapital" : false,
"population" : 80000
},
{
"_id" : "frenchCity/Paris",
"_key" : "Paris",
"_rev" : "588015042",
"isCapital" : true,
"population" : 4000000
},
{
"_id" : "frenchCity/Paris",
"_key" : "Paris",
"_rev" : "588015042",
"isCapital" : true,
"population" : 4000000
},
{
"_id" : "frenchCity/Lyon",
"_key" : "Lyon",
"_rev" : "587818434",
"isCapital" : false,
"population" : 80000
},
{
"_id" : "frenchCity/Lyon",
"_key" : "Lyon",
"_rev" : "587818434",
"isCapital" : false,
"population" : 80000
}
]