Skip to content

Commit

Permalink
Adds DISTINCT function to all drivers (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
dresende committed Apr 16, 2013
1 parent 60f58d8 commit a9915e3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/Drivers/DML/mysql.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
3 changes: 2 additions & 1 deletion lib/Drivers/DML/postgres.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
3 changes: 2 additions & 1 deletion lib/Drivers/DML/sqlite.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit a9915e3

Please sign in to comment.