8000 added derived file · johnrees/arangodb@39229bd · GitHub
[go: up one dir, main page]

Skip to content

Commit 39229bd

Browse files
author
Jan Steemann
committed
added derived file
1 parent f4c5722 commit 39229bd

File tree

1 file changed

+8
-5
lines changed
  • js/apps/system/_admin/aardvark/APP/frontend/js/modules/org/arangodb

1 file changed

+8
-5
lines changed

js/apps/system/_admin/aardvark/APP/frontend/js/modules/org/arangodb/general-graph.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3058,7 +3058,9 @@ Graph.prototype._commonNeighbors = function(vertex1Example, vertex2Example, opti
30583058
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphModuleCommonNeighborsAmount1}
30593059
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
30603060
/// 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);
30623064
/// ~ examples.dropGraph("routeplanner");
30633065
/// @END_EXAMPLE_ARANGOSH_OUTPUT
30643066
///
@@ -3068,8 +3070,8 @@ Graph.prototype._commonNeighbors = function(vertex1Example, vertex2Example, opti
30683070
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphModuleCommonNeighborsAmount2}
30693071
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
30703072
/// 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);
30733075
/// ~ examples.dropGraph("routeplanner");
30743076
/// @END_EXAMPLE_ARANGOSH_OUTPUT
30753077
///
@@ -3085,8 +3087,8 @@ Graph.prototype._countCommonNeighbors = function(vertex1Example, vertex2Example,
30853087
+ ',@ex2'
30863088
+ ',@options1'
30873089
+ ',@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]) ]';
30903092
optionsVertex1 = optionsVertex1 || {};
30913093
optionsVertex2 = optionsVertex2 || {};
30923094
var bindVars = {
@@ -3096,6 +3098,7 @@ Graph.prototype._countCommonNeighbors = function(vertex1Example, vertex2Example,
30963098
"ex1": ex1,
30973099
"ex2": ex2
30983100
};
3101+
30993102
var result = db._query(query, bindVars, {count: true}).toArray(),
31003103
tmp = {}, tmp2={}, returnHash = [];
31013104
result.forEach(function (r) {

0 commit comments

Comments
 (0)
0