1
0
Fork 0

added maxIterations param to GRAPH_EDGES and GRAPH_NEIGHBORS

This commit is contained in:
scottashton 2014-11-18 09:42:17 +01:00
parent 0be7a0c36d
commit 8f3779b1eb
2 changed files with 8 additions and 2 deletions

View File

@ -5825,7 +5825,9 @@ function AQL_NEIGHBORS (vertexCollection,
/// depth a path to a neighbor must have to be returned (default is 1).
/// * *maxDepth* : Defines the maximal
/// depth a path to a neighbor must have to be returned (default is 1).
///
/// * *maxIterations*: the maximum number of iterations that the traversal is
/// allowed to perform. It is sensible to set this number so unbounded traversals
/// will terminate at some point.
/// @EXAMPLES
///
/// A route planner example, all neighbors of locations with a distance of either
@ -5875,6 +5877,7 @@ function AQL_GRAPH_NEIGHBORS (graphName,
factory = TRAVERSAL.generalGraphDatasourceFactory(graphName);
params.minDepth = options.minDepth === undefined ? 1 : options.minDepth;
params.maxDepth = options.maxDepth === undefined ? 1 : options.maxDepth;
params.maxIterations = options.maxIterations;
params.paths = true;
params.visitor = TRAVERSAL_NEIGHBOR_VISITOR;
var fromVertices = RESOLVE_GRAPH_TO_FROM_VERTICES(graphName, options);
@ -5946,6 +5949,8 @@ function AQL_GRAPH_NEIGHBORS (graphName,
/// * *maxDepth* : Defines the maximal length of a path from an edge
/// to a vertex (default is 1, which means only the edges directly connected to a vertex would
/// be returned).
/// * *maxIterations*: the maximum number of iterations that the traversal is
/// allowed to perform. It is sensible to set this number so unbounded traversals
///
/// @EXAMPLES
///

View File

@ -439,7 +439,8 @@ function ahuacatlQueryGeneralEdgesTestSuite() {
name: gN,
example: v1 + "/v1",
options: {
direction : 'any'
direction : 'any',
maxIterations : 10000
}
};
var actual = getRawQueryResults(AQL_NEIGHBORS, bindVars);