mirror of https://gitee.com/bigwinds/arangodb
added custom visitor functionality for GRAPH_NEIGHBORS, too
This commit is contained in:
parent
6fa6516cf0
commit
442b716d75
|
@ -87,6 +87,8 @@ v2.5.0 (XXXX-XX-XX)
|
|||
v2.4.4 (2015-XX-XX)
|
||||
-------------------
|
||||
|
||||
* add custom visitor functionality for `GRAPH_NEIGHBORS` function, too
|
||||
|
||||
* increased default value of traversal option *maxIterations* to 100 times of its previous
|
||||
default value
|
||||
|
||||
|
|
|
@ -6466,7 +6466,15 @@ function AQL_GRAPH_NEIGHBORS (graphName,
|
|||
params.maxDepth = options.maxDepth === undefined ? 1 : options.maxDepth;
|
||||
params.maxIterations = options.maxIterations;
|
||||
params.paths = true;
|
||||
params.visitor = TRAVERSAL_NEIGHBOR_VISITOR;
|
||||
// add user-defined visitor, if specified
|
||||
if (typeof options.visitor === "string") {
|
||||
params.visitorReturnsResults = options.visitorReturnsResults || false;
|
||||
params.visitor = GET_VISITOR(options.visitor, options);
|
||||
}
|
||||
else {
|
||||
params.visitor = TRAVERSAL_NEIGHBOR_VISITOR;
|
||||
}
|
||||
|
||||
var fromVertices = RESOLVE_GRAPH_TO_FROM_VERTICES(graphName, options);
|
||||
if (options.edgeExamples) {
|
||||
params.followEdges = options.edgeExamples;
|
||||
|
|
Loading…
Reference in New Issue