Comparing version 6.1.3 to 6.1.4
@@ -5,2 +5,9 @@ # Changelog | ||
### [6.1.4](https://gitlab.com/dmfay/massive-js/compare/v6.1.3...v6.1.4) (2019-12-11) | ||
### Bug Fixes | ||
* support IN / NOT IN with an empty array ([cc0aa6f](https://gitlab.com/dmfay/massive-js/commit/cc0aa6f2587bcf1f037a7f178bc0a1143fdd23a8)) | ||
### [6.1.3](https://gitlab.com/dmfay/massive-js/compare/v6.1.2...v6.1.3) (2019-12-01) | ||
@@ -7,0 +14,0 @@ |
@@ -36,2 +36,8 @@ 'use strict'; | ||
const buildIn = condition => { | ||
if (condition.value.length === 0) { | ||
condition.value = condition.appended.operator === '=' ? `ANY ('{}')` : `ALL ('{}')`; | ||
return condition; | ||
} | ||
condition.appended.operator = condition.appended.operator === '=' ? 'IN' : 'NOT IN'; | ||
@@ -38,0 +44,0 @@ |
{ | ||
"name": "massive", | ||
"version": "6.1.3", | ||
"version": "6.1.4", | ||
"description": "A small query tool for Postgres that embraces json and makes life simpler", | ||
@@ -5,0 +5,0 @@ "homepage": "https://massivejs.org", |
176766
2983