From d55f1cdec21a6436748317f4170923812e96dafc Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Thu, 20 Nov 2014 10:27:06 +0100 Subject: [PATCH] added derived file --- .../js/modules/org/arangodb/general-graph.js | 29 ++++++++++++++----- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/js/apps/system/aardvark/frontend/js/modules/org/arangodb/general-graph.js b/js/apps/system/aardvark/frontend/js/modules/org/arangodb/general-graph.js index aa58463ba4..2a0d84159e 100644 --- a/js/apps/system/aardvark/frontend/js/modules/org/arangodb/general-graph.js +++ b/js/apps/system/aardvark/frontend/js/modules/org/arangodb/general-graph.js @@ -1034,7 +1034,7 @@ AQLGenerator.prototype._getLastRestrictableStatementInfo = function() { AQLGenerator.prototype.restrict = function(restrictions) { var rest = stringToArray(restrictions); - if (rest.length == 0) { + if (rest.length === 0) { return this; } this._addToPrint("restrict", restrictions); @@ -4539,7 +4539,7 @@ Graph.prototype._removeVertexCollection = function(vertexCollectionName, dropCol //////////////////////////////////////////////////////////////////////////////// Graph.prototype._getConnectingEdges = function(vertexExample1, vertexExample2, options) { - var AQLStmt = new AQLGenerator(this); + if (!options) { options = {}; } @@ -4547,11 +4547,26 @@ Graph.prototype._getConnectingEdges = function(vertexExample1, vertexExample2, o var opts = { }; - options.vertex1CollectionRestriction ? opts.startVertexCollectionRestriction = options.vertex1CollectionRestriction : null ; - options.vertex2CollectionRestriction ? opts.endVertexCollectionRestriction = options.vertex2CollectionRestriction : null ; - options.edgeCollectionRestriction ? opts.edgeCollectionRestriction = options.edgeCollectionRestriction : null ; - options.edgeExamples ? opts.edgeExamples = options.edgeExamples : null ; - vertexExample2 ? opts.neighborExamples = vertexExample2 : null ; + if (options.vertex1CollectionRestriction) { + opts.startVertexCollectionRestriction = options.vertex1CollectionRestriction; + } + + if (options.vertex2CollectionRestriction) { + opts.endVertexCollectionRestriction = options.vertex2CollectionRestriction; + } + + if (options.edgeCollectionRestriction) { + opts.edgeCollectionRestriction = options.edgeCollectionRestriction; + } + + if (options.edgeExamples) { + opts.edgeExamples = options.edgeExamples; + } + + if (vertexExample2) { + opts.neighborExamples = vertexExample2; + } + var query = "RETURN" + " GRAPH_EDGES(@graphName" + ',@vertexExample'