mirror of https://gitee.com/bigwinds/arangodb
distinct result on GRAPH_EDGES
This commit is contained in:
parent
b67a016b4c
commit
90e4bf9bd3
|
@ -5949,11 +5949,14 @@ function GENERAL_GRAPH_EDGES (
|
|||
|
||||
var neighbors = GENERAL_GRAPH_NEIGHBORS(graphName,
|
||||
vertexExample,
|
||||
options), result = [];
|
||||
options), result = [],ids = [];
|
||||
|
||||
neighbors.forEach(function (n) {
|
||||
n.path.edges.forEach(function (e) {
|
||||
result = result.concat(e);
|
||||
if (ids.indexOf(e._id) === -1) {
|
||||
result.push(e);
|
||||
ids.push(e._id);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -132,14 +132,11 @@ function ahuacatlQueryGeneralEdgesTestSuite() {
|
|||
actual = getQueryResults("FOR e IN GRAPH_EDGES('bla3', [{hugo : true}, {heinz : 1}], {direction : 'any'}) " +
|
||||
"SORT e.what RETURN e.what");
|
||||
assertEqual(actual, [ "v1->v2",
|
||||
"v1->v2",
|
||||
"v1->v5",
|
||||
"v2->v1",
|
||||
"v2->v1",
|
||||
"v2->v5",
|
||||
"v3->v5",
|
||||
"v3->v6",
|
||||
"v3->v8",
|
||||
"v3->v8" ]);
|
||||
|
||||
actual = getRawQueryResults("FOR e IN GRAPH_VERTICES('bla3', [{hugo : true}, {heinz : 1}], {direction : 'any'}) SORT e._id RETURN e");
|
||||
|
|
Loading…
Reference in New Issue