Comparing version 6.1.0 to 6.2.0
@@ -0,1 +1,4 @@ | ||
### v6.2.0 | ||
- [Feature] Add `.driver.generateQuery` function - same as `.driver.execQuery` but returns the SQL instead of executing it | ||
### v6.1.0 | ||
@@ -2,0 +5,0 @@ - [Feature] Accept options when calling `Model.create` ([856](../../pull/856)) |
var Promise = require('bluebird'); | ||
var generateQuery = function (sql, params) { | ||
return this.query.escape(sql, params); | ||
}; | ||
var execQuery = function () { | ||
var cb; | ||
var query; | ||
if (arguments.length == 2) { | ||
var query = arguments[0]; | ||
var cb = arguments[1]; | ||
query = arguments[0]; | ||
cb = arguments[1]; | ||
} else if (arguments.length == 3) { | ||
var query = this.query.escape(arguments[0], arguments[1]); | ||
var cb = arguments[2]; | ||
query = this.generateQuery(arguments[0], arguments[1]); | ||
cb = arguments[2]; | ||
} | ||
@@ -33,2 +40,4 @@ return this.execSimpleQuery(query, cb); | ||
module.exports = { | ||
generateQuery: generateQuery, | ||
execQuery: execQuery, | ||
@@ -35,0 +44,0 @@ |
@@ -15,3 +15,3 @@ { | ||
], | ||
"version": "6.1.0", | ||
"version": "6.2.0", | ||
"license": "MIT", | ||
@@ -18,0 +18,0 @@ "homepage": "http://dresende.github.io/node-orm2", |
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
268046
6226