Comparing version 6.10.0 to 6.10.1
@@ -5,2 +5,9 @@ # Changelog | ||
### [6.10.1](https://gitlab.com/dmfay/massive-js/compare/v6.10.0...v6.10.1) (2021-09-21) | ||
### Bug Fixes | ||
* improve performance for large IN queries ([ad7690b](https://gitlab.com/dmfay/massive-js/commit/ad7690bede046cac4fe796c207a92b345cc40f5f)) | ||
## [6.10.0](https://gitlab.com/dmfay/massive-js/compare/v6.9.1...v6.10.0) (2021-07-17) | ||
@@ -7,0 +14,0 @@ |
@@ -264,5 +264,4 @@ 'use strict'; | ||
* | ||
* @param {Object} criteria - The criteria object representing the JOIN | ||
* conditions. May be nested with `$or`, just as ordinary criteria objects. | ||
* @param {Number} offset - Offset prepared statement parameter ordinals | ||
* @param {Object} criteria - A criteria object. | ||
* @param {Number} offset - Offset prepared statement parameter ordinals. | ||
* @param {Symbol} kind - forJoin, forWhere, or forDoc. | ||
@@ -293,5 +292,4 @@ * @return {String} The JOIN condition text, to be stored and interpolated into | ||
* | ||
* @param {Object} criteria - The criteria object representing the JOIN | ||
* conditions. May be nested with `$or`, just as ordinary criteria objects. | ||
* @param {Number} offset - Offset prepared statement parameter ordinals | ||
* @param {Object} criteria - A criteria object. | ||
* @param {Number} offset - Offset prepared statement parameter ordinals. | ||
* @param {Symbol} kind - forJoin, forWhere, or forDoc. | ||
@@ -298,0 +296,0 @@ * @return {String} The JOIN condition text, to be stored and interpolated into |
@@ -44,8 +44,5 @@ 'use strict'; | ||
const inList = _.reduce(condition.value, (list, v) => { | ||
condition.params.push(v); | ||
return list.concat([`$${condition.offset++}${castTimestamp(v)}`]); | ||
}, []); | ||
condition.params = condition.params.concat(condition.value); | ||
const inList = condition.value.map((v, index) => [`$${condition.offset + index}${castTimestamp(v)}`]); | ||
condition.offset += condition.value.length; | ||
condition.value = `(${inList.join(',')})`; | ||
@@ -52,0 +49,0 @@ |
{ | ||
"name": "massive", | ||
"version": "6.10.0", | ||
"version": "6.10.1", | ||
"description": "A small query tool for Postgres that embraces json and makes life simpler", | ||
@@ -5,0 +5,0 @@ "homepage": "https://massivejs.org", |
Sorry, the diff of this file is not supported yet
189487
3102