Comparing version 0.0.13 to 0.0.14
@@ -1,2 +0,10 @@ | ||
var Where = require("./Where"); | ||
var Where = require("./Where"); | ||
var aggregate_functions = [ | ||
"ABS", "CEIL", "FLOOR", "ROUND", | ||
"AVG", "MIN", "MAX", | ||
"LOG", "LOG2", "LOG10", "EXP", "POWER", | ||
"ACOS", "ASIN", "ATAN", "COS", "SIN", "TAN", | ||
"CONV", "RANDOM", "RAND", "RADIANS", "DEGREES", | ||
"SUM", "COUNT" | ||
]; | ||
@@ -37,4 +45,3 @@ exports.SelectQuery = SelectQuery; | ||
}; | ||
return { | ||
var proto = { | ||
select: function (fields) { | ||
@@ -46,15 +53,2 @@ if (fields) { | ||
}, | ||
abs : aggregate_fun("ABS"), | ||
ceil : aggregate_fun("CEIL"), | ||
floor : aggregate_fun("FLOOR"), | ||
round : aggregate_fun("ROUND"), | ||
avg : aggregate_fun("AVG"), | ||
min : aggregate_fun("MIN"), | ||
max : aggregate_fun("MAX"), | ||
sum : aggregate_fun("SUM"), | ||
count : aggregate_fun("COUNT"), | ||
fun: function (fun, column, alias) { | ||
@@ -295,2 +289,8 @@ if (!Array.isArray(sql.from[sql.from.length - 1].select)) { | ||
}; | ||
for (var i = 0; i < aggregate_functions.length; i++) { | ||
proto[aggregate_functions[i].toLowerCase()] = aggregate_fun(aggregate_functions[i]); | ||
} | ||
return proto; | ||
} |
@@ -9,3 +9,3 @@ { | ||
], | ||
"version": "0.0.13", | ||
"version": "0.0.14", | ||
"license": "MIT", | ||
@@ -12,0 +12,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30981
1093