From a2a77f7c0dfdb6bdf72f80f24ad8388f6a27f44b Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Mon, 17 Nov 2014 13:31:02 +0100 Subject: [PATCH] fixed tests --- .../org/arangodb/simple-query-common.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/js/common/modules/org/arangodb/simple-query-common.js b/js/common/modules/org/arangodb/simple-query-common.js index 80db052071..a5cad4d797 100644 --- a/js/common/modules/org/arangodb/simple-query-common.js +++ b/js/common/modules/org/arangodb/simple-query-common.js @@ -1222,6 +1222,25 @@ SimpleQueryWithin.prototype._PRINT = function (context) { context.output += text; }; +//////////////////////////////////////////////////////////////////////////////// +/// @brief adds the distance attribute +//////////////////////////////////////////////////////////////////////////////// + +SimpleQueryWithin.prototype.distance = function (attribute) { + var clone; + + clone = this.clone(); + + if (attribute) { + clone._distance = attribute; + } + else { + clone._distance = "distance"; + } + + return clone; +}; + // ----------------------------------------------------------------------------- // --SECTION-- SIMPLE QUERY WITHINRECTANGLE // -----------------------------------------------------------------------------