Comparing version 3.7.8 to 3.8.0
@@ -33,2 +33,3 @@ /* SQB | ||
const OpNotILike = require('./sqlobject/operators/OpNotILike'); | ||
const OpExists = require('./sqlobject/operators/OpExists'); | ||
@@ -90,2 +91,5 @@ const JoinType = types.JoinType; | ||
return new OpNotILike(...args); | ||
}, | ||
exists: function(...args) { | ||
return new OpExists(...args); | ||
} | ||
@@ -112,3 +116,4 @@ }; | ||
'!ilike': Op.notILike, | ||
'!is': Op.not | ||
'!is': Op.not, | ||
'exists': Op.exists | ||
}); | ||
@@ -115,0 +120,0 @@ |
@@ -95,9 +95,14 @@ /* SQB | ||
} | ||
const m = n.match(/^([\w\\.$]+) *(.*)$/); | ||
if (!m) | ||
throw new ArgumentError('"%s" is not a valid definition', n); | ||
op = Op[m[2] || 'eq']; | ||
if (!op) | ||
throw new ArgumentError('Unknown operator "%s"', m[2]); | ||
result.push(op(m[1], obj[n])); | ||
if (n === 'exists') { | ||
op = Op.exists; | ||
result.push(Op.exists(obj[n])); | ||
} else { | ||
const m = n.match(/^([\w\\.$]+) *(.*)$/); | ||
if (!m) | ||
throw new ArgumentError('"%s" is not a valid definition', n); | ||
op = Op[m[2] || 'eq']; | ||
if (!op) | ||
throw new ArgumentError('Unknown operator "%s"', m[2]); | ||
result.push(op(m[1], obj[n])); | ||
} | ||
} | ||
@@ -104,0 +109,0 @@ return result; |
{ | ||
"name": "sqb", | ||
"description": "Extensible, multi-dialect SQL query builder and Database connection framework for JavaScript", | ||
"version": "3.7.8", | ||
"version": "3.8.0", | ||
"author": "Panates Ltd.", | ||
@@ -27,3 +27,3 @@ "contributors": [ | ||
"doublylinked": "^2.0.1", | ||
"errorex": "^2.3.1", | ||
"errorex": "^2.3.2", | ||
"lightning-pool": "^2.0.10", | ||
@@ -33,3 +33,3 @@ "putil-flattentext": "^2.0.0", | ||
"putil-merge": "^3.2.0", | ||
"putil-promisify": "^1.3.0", | ||
"putil-promisify": "^1.4.0", | ||
"putil-taskqueue": "^2.1.2", | ||
@@ -36,0 +36,0 @@ "putil-waterfall": "^2.1.1" |
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
123056
57
4536
Updatederrorex@^2.3.2
Updatedputil-promisify@^1.4.0