From 3d9061aa6964a80b72c80102e74d8e2922d6e3b9 Mon Sep 17 00:00:00 2001 From: Raymond Feng Date: Mon, 16 Dec 2013 08:40:06 -0800 Subject: [PATCH] Make the identation consistent for now --- lib/dao.js | 60 +++++++++++++++++++++++++++--------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/lib/dao.js b/lib/dao.js index 22f9cff2..0ea878a7 100644 --- a/lib/dao.js +++ b/lib/dao.js @@ -383,51 +383,51 @@ DataAccessObject._coerce = function (where) { return new OrigDate(arg); }; } else if (DataType === Boolean) { - DataType = function(val) { - if(val === 'true') { - return true; - } else if(val === 'false') { - return false; - } else { - return Boolean(val); - } - }; + DataType = function(val) { + if(val === 'true') { + return true; + } else if(val === 'false') { + return false; + } else { + return Boolean(val); + } + }; } else if(DataType === Number) { - // This fixes a regression in mongodb connector - // For numbers, only convert it produces a valid number - // LoopBack by default injects a number id. We should fix it based - // on the connector's input, for example, mongoddb should use string - // while RDBs typically use number - DataType = function(val) { - var num = Number(val); - return !isNaN(num) ? num : val; - }; + // This fixes a regression in mongodb connector + // For numbers, only convert it produces a valid number + // LoopBack by default injects a number id. We should fix it based + // on the connector's input, for example, MongoDB should use string + // while RDBs typically use number + DataType = function(val) { + var num = Number(val); + return !isNaN(num) ? num : val; + }; } - if (!DataType) { - continue; + if (!DataType) { + continue; } if (DataType === geo.GeoPoint) { - // Skip the GeoPoint as the near operator breaks the assumption that - // an operation has only one property - // We should probably fix it based on - // http://docs.mongodb.org/manual/reference/operator/query/near/ - // The other option is to make operators start with $ - continue; + // Skip the GeoPoint as the near operator breaks the assumption that + // an operation has only one property + // We should probably fix it based on + // http://docs.mongodb.org/manual/reference/operator/query/near/ + // The other option is to make operators start with $ + continue; } var val = where[p]; if(val === null || val === undefined) { - continue; + continue; } // Check there is an operator var operator = null; if ('object' === typeof val) { if (Object.keys(val).length !== 1) { - // Skip if there are not only one properties - // as the assumption for operators is not true here - continue; + // Skip if there are not only one properties + // as the assumption for operators is not true here + continue; } for (var op in operators) { if (op in val) {