mirror of https://gitee.com/bigwinds/arangodb
issue #1104: edgeExamples broken or changed
This commit is contained in:
parent
8f3779b1eb
commit
2b92cf5edd
|
@ -4656,10 +4656,7 @@ function FILTER_RESTRICTION (list, restrictionList) {
|
|||
|
||||
function DOCUMENTS_BY_EXAMPLE (collectionList, example) {
|
||||
var res = [ ];
|
||||
if (example === "null") {
|
||||
example = [{}];
|
||||
}
|
||||
if (!example) {
|
||||
if (example === "null" || example === null || ! example) {
|
||||
example = [ { } ];
|
||||
}
|
||||
if (typeof example === "string") {
|
||||
|
@ -4672,7 +4669,8 @@ function DOCUMENTS_BY_EXAMPLE (collectionList, example) {
|
|||
example.forEach(function (e) {
|
||||
if (typeof e === "string") {
|
||||
tmp.push({ _id : e });
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
tmp.push(e);
|
||||
}
|
||||
});
|
||||
|
@ -5219,6 +5217,9 @@ function CALCULATE_SHORTEST_PATHES_WITH_DIJKSTRA (graphName, options) {
|
|||
params.paths = true;
|
||||
if (options.edgeExamples) {
|
||||
params.followEdges = options.edgeExamples;
|
||||
if (! Array.isArray(params.followEdges)) {
|
||||
params.followEdges = [ params.followEdges ];
|
||||
}
|
||||
}
|
||||
if (options.edgeCollectionRestriction) {
|
||||
params.edgeCollectionRestriction = options.edgeCollectionRestriction;
|
||||
|
|
Loading…
Reference in New Issue