mirror of https://gitee.com/bigwinds/arangodb
added maxIterations param to GRAPH_EDGES and GRAPH_NEIGHBORS
This commit is contained in:
parent
0be7a0c36d
commit
8f3779b1eb
|
@ -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
|
||||
///
|
||||
|
|
|
@ -439,7 +439,8 @@ function ahuacatlQueryGeneralEdgesTestSuite() {
|
|||
name: gN,
|
||||
example: v1 + "/v1",
|
||||
options: {
|
||||
direction : 'any'
|
||||
direction : 'any',
|
||||
maxIterations : 10000
|
||||
}
|
||||
};
|
||||
var actual = getRawQueryResults(AQL_NEIGHBORS, bindVars);
|
||||
|
|
Loading…
Reference in New Issue