@@ -3058,7 +3058,9 @@ Graph.prototype._commonNeighbors = function(vertex1Example, vertex2Example, opti
3058
3058
/// @EXAMPLE_ARANGOSH_OUTPUT {generalGraphModuleCommonNeighborsAmount1}
3059
3059
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
3060
3060
/// var graph = examples.loadGraph("routeplanner");
3061
- /// graph._countCommonNeighbors({isCapital : true}, {isCapital : true});
3061
+ /// var example = { isCapital: true };
3062
+ /// var options = { includeData: true };
3063
+ /// graph._countCommonNeighbors(example, example, options, options);
3062
3064
/// ~ examples.dropGraph("routeplanner");
3063
3065
/// @END_EXAMPLE_ARANGOSH_OUTPUT
3064
3066
///
@@ -3068,8 +3070,8 @@ Graph.prototype._commonNeighbors = function(vertex1Example, vertex2Example, opti
3068
3070
/// @EXAMPLE_ARANGOSH_OUTPUT {generalGraphModuleCommonNeighborsAmount2}
3069
3071
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
3070
3072
/// var graph = examples.loadGraph("routeplanner");
3071
- /// | graph._countCommonNeighbors('germanCity/Hamburg', {}, {direction : 'outbound', maxDepth : 2},
3072
- /// {direction : 'outbound ', maxDepth : 2} );
3073
+ /// var options = { direction : 'outbound', maxDepth: 2, includeData: true };
3074
+ /// graph._countCommonNeighbors('germanCity/Hamburg ', {}, options, options );
3073
3075
/// ~ examples.dropGraph("routeplanner");
3074
3076
/// @END_EXAMPLE_ARANGOSH_OUTPUT
3075
3077
///
@@ -3085,8 +3087,8 @@ Graph.prototype._countCommonNeighbors = function(vertex1Example, vertex2Example,
3085
3087
+ ',@ex2'
3086
3088
+ ',@options1'
3087
3089
+ ',@options2'
3088
- + ') FOR a in ATTRIBUTES(e) FOR b in ATTRIBUTES(e[a]) '
3089
- + 'SORT ATTRIBUTES(e)[0] RETURN [a, b, LENGTH(e[a][b]) ]' ;
3090
+ + ') FOR a in ATTRIBUTES(e) FOR b in ATTRIBUTES(e[a]) '
3091
+ + 'SORT ATTRIBUTES(e)[0] RETURN [a, b, LENGTH(e[a][b]) ]' ;
3090
3092
optionsVertex1 = optionsVertex1 || { } ;
3091
3093
optionsVertex2 = optionsVertex2 || { } ;
3092
3094
var bindVars = {
@@ -3096,6 +3098,7 @@ Graph.prototype._countCommonNeighbors = function(vertex1Example, vertex2Example,
3096
3098
"ex1" : ex1 ,
3097
3099
"ex2" : ex2
3098
3100
} ;
3101
+
3099
3102
var result = db . _query ( query , bindVars , { count : true } ) . toArray ( ) ,
3100
3103
tmp = { } , tmp2 = { } , returnHash = [ ] ;
3101
3104
result . forEach ( function ( r ) {
0 commit comments