Comparing version 0.5.2 to 0.5.3
@@ -81,7 +81,11 @@ // Grammar | ||
return sql.join(', '); | ||
}, | ||
}, | ||
// Compiles the columns in the query, specifying if an item was distinct. | ||
compileColumns: function(qb, columns) { | ||
return (qb.flags.distinct ? 'select distinct' : 'select') + ((_.isArray(columns) && _.isEmpty(columns)) ? '' : ' '+this.columnize(columns)); | ||
var columnsIsArray = _.isArray(columns); | ||
var columnsEmpty = _.isEmpty(columns); | ||
var sql = (qb.flags.distinct ? 'select distinct' : 'select') + ((columnsIsArray && columnsEmpty) ? '' : ' '+this.columnize(columns)); | ||
sql = qb.aggregates.length && !columnsEmpty ? sql + ',' : sql; | ||
return sql; | ||
}, | ||
@@ -88,0 +92,0 @@ |
@@ -1,2 +0,2 @@ | ||
// Knex.js 0.5.2 | ||
// Knex.js 0.5.3 | ||
// -------------- | ||
@@ -91,3 +91,3 @@ | ||
// Keep in sync with package.json | ||
knex.VERSION = '0.5.2'; | ||
knex.VERSION = '0.5.3'; | ||
@@ -94,0 +94,0 @@ // Runs a new transaction, taking a container and returning a promise |
{ | ||
"name": "knex", | ||
"version": "0.5.2", | ||
"version": "0.5.3", | ||
"description": "A query builder for Postgres, MySQL and SQLite3, designed to be flexible, portable, and fun to use.", | ||
@@ -5,0 +5,0 @@ "main": "knex.js", |
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
245500
6411