From a9915e3c770493328bee550f96e1bf9337c2495e Mon Sep 17 00:00:00 2001 From: Diogo Resende Date: Tue, 16 Apr 2013 18:24:04 +0100 Subject: [PATCH] Adds DISTINCT function to all drivers (#123) --- lib/Drivers/DML/mysql.js | 3 ++- lib/Drivers/DML/postgres.js | 3 ++- lib/Drivers/DML/sqlite.js | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/Drivers/DML/mysql.js b/lib/Drivers/DML/mysql.js index ecc8843e..2827e454 100644 --- a/lib/Drivers/DML/mysql.js +++ b/lib/Drivers/DML/mysql.js @@ -20,7 +20,8 @@ function Driver(config, connection, opts) { "LOG", "LOG2", "LOG10", "EXP", "POWER", "ACOS", "ASIN", "ATAN", "COS", "SIN", "TAN", "CONV", [ "RANDOM", "RAND" ], "RADIANS", "DEGREES", - "SUM", "COUNT" ]; + "SUM", "COUNT", + "DISTINCT" ]; } Driver.prototype.sync = function (opts, cb) { diff --git a/lib/Drivers/DML/postgres.js b/lib/Drivers/DML/postgres.js index 261b9963..6891d3d5 100644 --- a/lib/Drivers/DML/postgres.js +++ b/lib/Drivers/DML/postgres.js @@ -36,7 +36,8 @@ function Driver(config, connection, opts) { "LOG", "EXP", "POWER", "ACOS", "ASIN", "ATAN", "COS", "SIN", "TAN", "RANDOM", "RADIANS", "DEGREES", - "SUM", "COUNT" ]; + "SUM", "COUNT", + "DISTINCT" ]; } var switchableFunctions = { diff --git a/lib/Drivers/DML/sqlite.js b/lib/Drivers/DML/sqlite.js index e1ef7b9b..585eb9a8 100644 --- a/lib/Drivers/DML/sqlite.js +++ b/lib/Drivers/DML/sqlite.js @@ -20,7 +20,8 @@ function Driver(config, connection, opts) { this.aggregate_functions = [ "ABS", "ROUND", "AVG", "MIN", "MAX", "RANDOM", - "SUM", "COUNT" ]; + "SUM", "COUNT", + "DISTINCT" ]; } Driver.prototype.sync = function (opts, cb) {