breeze-sequelize
Advanced tools
Comparing version 0.5.3 to 0.5.4
{ | ||
"name": "breeze-sequelize", | ||
"version": "0.5.3", | ||
"version": "0.5.4", | ||
"description": "Breeze Sequelize server implementation", | ||
@@ -47,3 +47,4 @@ "keywords": [ | ||
"build": "tsc && npm pack && npm run install-to-demo", | ||
"install-to-demo": "cd ../test/BreezeExpressDemo && npm install ../../src/breeze-sequelize-0.5.3.tgz", | ||
"install-to-demo": "cd ../test/BreezeExpressDemo && npm install ../../src/breeze-sequelize-0.5.4.tgz", | ||
"install-to-unit": "cd ../test/unit && npm install ../../src/breeze-sequelize-0.5.4.tgz", | ||
"clean": "rimraf *.js && rimraf *.map && rimraf types" | ||
@@ -50,0 +51,0 @@ }, |
@@ -122,2 +122,5 @@ "use strict"; | ||
} | ||
if (this.sequelizeManager.sequelizeOptions.logging) { | ||
console.dir(this.sqQuery, { depth: 10 }); | ||
} | ||
return this.sqQuery; | ||
@@ -450,6 +453,6 @@ } | ||
parent.include && parent.include.forEach(inc => processAndOr(inc)); | ||
console.trace(parent); | ||
// console.trace(parent); | ||
} | ||
function processAndOrClause(where) { | ||
console.log("processAndOrClause", where); | ||
// console.log("processAndOrClause", where); | ||
let ands = (where[sequelize_1.Op.and] || where['and']); | ||
@@ -456,0 +459,0 @@ let ors = (where[sequelize_1.Op.or] || where['or']); |
@@ -16,3 +16,3 @@ "use strict"; | ||
} | ||
if (!_.isEmpty(predSq.include)) { | ||
if (!isEmpty(predSq.include)) { | ||
throw new Error("Unable to negate an expression that requires a Sequelize 'include'"); | ||
@@ -119,6 +119,6 @@ } | ||
predSqs.forEach(function (predSq) { | ||
if (!_.isEmpty(predSq.where)) { | ||
if (!isEmpty(predSq.where)) { | ||
wheres.push(predSq.where); | ||
} | ||
if (!_.isEmpty(predSq.include)) { | ||
if (!isEmpty(predSq.include)) { | ||
let processIncludes = function (sourceIncludes, targetIncludes) { | ||
@@ -147,3 +147,3 @@ sourceIncludes.forEach(function (sourceInclude) { | ||
} | ||
if (!_.isEmpty(sourceInclude.include)) | ||
if (!isEmpty(sourceInclude.include)) | ||
processIncludes(sourceInclude.include, include.include); | ||
@@ -261,2 +261,9 @@ } | ||
} | ||
/** lodash isEmpty function returns true for object with Symbol keys, so we have to extend */ | ||
function isEmpty(value) { | ||
if (value === null || value === undefined) { | ||
return true; | ||
} | ||
return _.isEmpty(value) && Object.getOwnPropertySymbols(value).length === 0; | ||
} | ||
let translateMap = { | ||
@@ -263,0 +270,0 @@ toupper: { |
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
92276
1963