Comparing version 0.1.5 to 0.1.7
@@ -26,3 +26,19 @@ /* UNIQORM | ||
returning(columns) { | ||
this._returning = | ||
if (typeof columns === 'string') { | ||
const cols = columns.split(/\s*,\s*/); | ||
const allFields = this.model.meta.getFieldNames(); | ||
let a = []; | ||
cols.forEach(n => { | ||
if (n === '*') | ||
a = a.concat(allFields.filter((item) => { | ||
return a.indexOf(item) < 0; | ||
})); | ||
if (n.startsWith('-')) { | ||
let i = a.indexOf(n.substring(1)); | ||
if (i >= 0) | ||
a.splice(i, 1); | ||
} | ||
}); | ||
this._returning = a; | ||
} else this._returning = | ||
columns ? Array.prototype.slice.call(arguments) : undefined; | ||
@@ -29,0 +45,0 @@ return this; |
{ | ||
"name": "uniqorm", | ||
"description": "Easy to use, multi-dialect ORM framework for JavaScript", | ||
"version": "0.1.5", | ||
"version": "0.1.7", | ||
"author": "Panates Ltd.", | ||
@@ -23,3 +23,3 @@ "contributors": [ | ||
"dependencies": { | ||
"chalk": "^2.0.1", | ||
"chalk": "^2.1.0", | ||
"commander": "^2.11.0", | ||
@@ -34,6 +34,6 @@ "putil-promisify": "^1.0.4", | ||
"istanbul": "^0.4.5", | ||
"mocha": "^3.4.2" | ||
"mocha": "^3.5.0" | ||
}, | ||
"peerDependencies": { | ||
"sqb": "^0.7.3" | ||
"sqb": "^0.7.10" | ||
}, | ||
@@ -40,0 +40,0 @@ "engines": { |
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
55537
1942
Updatedchalk@^2.1.0