Comparing version 6.11.2 to 6.11.3
@@ -5,2 +5,9 @@ # Changelog | ||
### [6.11.3](https://gitlab.com/dmfay/massive-js/compare/v6.11.2...v6.11.3) (2024-12-07) | ||
### Bug Fixes | ||
* break up name predicates in sequences.sql for faster plan with many sequences ([d06b160](https://gitlab.com/dmfay/massive-js/commit/d06b160db3b124040505e2fee81d3007dc00e5ee)) | ||
### [6.11.2](https://gitlab.com/dmfay/massive-js/compare/v6.11.1...v6.11.2) (2023-02-02) | ||
@@ -7,0 +14,0 @@ |
'use strict'; | ||
const _ = require('lodash'); | ||
const pgp = require('pg-promise'); | ||
const util = require('util'); | ||
@@ -416,11 +417,23 @@ const murmurhash = require('murmurhash').v3; | ||
const innerKind = criteria.isDocument ? this.forDoc : this.forWhere; | ||
subWhere = this.predicate(criteria.where, criteria.params.length, innerKind); | ||
subWhere = this.predicate(criteria.where, offset, innerKind); | ||
} else { | ||
subWhere = this.predicate(criteria.where, criteria.params.length, kind); | ||
subWhere = this.predicate(criteria.where, offset, kind); | ||
} | ||
return { | ||
predicate: `${criteria.conditions} AND ${subWhere.predicate}`, | ||
params: criteria.params.concat(subWhere.params) | ||
predicate: `(${pgp.as.format(criteria.conditions, criteria.params)}) AND (${subWhere.predicate})`, | ||
params: subWhere.params | ||
}; | ||
// if (Object.prototype.hasOwnProperty.call(criteria, 'isDocument')) { | ||
// const innerKind = criteria.isDocument ? this.forDoc : this.forWhere; | ||
// subWhere = this.predicate(criteria.where, offset, innerKind); | ||
// } else { | ||
// subWhere = this.predicate(criteria.where, offset, kind); | ||
// } | ||
// return { | ||
// predicate: `(${subWhere.predicate}) AND (${criteria.conditions})`, | ||
// params: subWhere.params.concat(criteria.params) | ||
// }; | ||
} | ||
@@ -427,0 +440,0 @@ |
{ | ||
"name": "massive", | ||
"version": "6.11.2", | ||
"version": "6.11.3", | ||
"description": "A small query tool for Postgres that embraces json and makes life simpler", | ||
@@ -5,0 +5,0 @@ "homepage": "https://massivejs.org", |
# Massive.js: A Postgres-centric Data Access Tool | ||
**Consider using Massive's successor, [monstrous](https://gitlab.com/monstrous/monstrous), especially for new development! monstrous applies the same concepts in a fluent query-builder format emphasizing composability and statement reuse, but the API surface is completely different and there is no easy upgrade path. Massive has been stable and very passively developed for years so not much is changing immediately.** | ||
**I'll continue to help land community contributions for the near but unspecific future; if you've contributed code, reports, or helped others with/posted about using Massive and are interested in maintainership, [raise an issue](https://gitlab.com/dmfay/massive-js/-/issues/new) or contact me!** | ||
[![node](https://img.shields.io/node/v/massive.svg)](https://npmjs.org/package/massive) | ||
@@ -4,0 +8,0 @@ [![Build Status](https://img.shields.io/gitlab/pipeline/dmfay/massive-js.svg)](https://gitlab.com/dmfay/massive-js/pipelines) |
Sorry, the diff of this file is not supported yet
198384
3134
44