@cap-js/postgres 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/lib/PostgresService.js +3 -8
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,26 @@
|
|
|
4
4
|
- The format is based on [Keep a Changelog](http://keepachangelog.com/).
|
|
5
5
|
- This project adheres to [Semantic Versioning](http://semver.org/).
|
|
6
6
|
|
|
7
|
+
## [2.0.1](https://github.com/cap-js/cds-dbs/compare/postgres-v2.0.0...postgres-v2.0.1) (2025-05-27)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
|
|
12
|
+
* remove PG `?` placeholder replacement ([#1180](https://github.com/cap-js/cds-dbs/issues/1180))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
* Enable mixing stream and normal parameters in queries ([#1179](https://github.com/cap-js/cds-dbs/issues/1179)) ([7ee8083](https://github.com/cap-js/cds-dbs/commit/7ee808365426072250dd6de87abd11215f44561a))
|
|
18
|
+
* hierarchies in quoted mode ([3465cba](https://github.com/cap-js/cds-dbs/commit/3465cbab579d4560d12d3b230c55b746d4d3f5a5))
|
|
19
|
+
* only sort by locale if locale is set ([#1193](https://github.com/cap-js/cds-dbs/issues/1193)) ([3465cba](https://github.com/cap-js/cds-dbs/commit/3465cbab579d4560d12d3b230c55b746d4d3f5a5))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
|
|
24
|
+
* remove PG `?` placeholder replacement ([#1180](https://github.com/cap-js/cds-dbs/issues/1180)) ([a1e0bd9](https://github.com/cap-js/cds-dbs/commit/a1e0bd9fe8501c284d8cbfc8d79d4dddda34c087))
|
|
25
|
+
* remove stream_compat ([#1139](https://github.com/cap-js/cds-dbs/issues/1139)) ([#1144](https://github.com/cap-js/cds-dbs/issues/1144)) ([1b8b2d9](https://github.com/cap-js/cds-dbs/commit/1b8b2d9539cd97be2cef088c98d88ef9ec7dd1bf))
|
|
26
|
+
|
|
7
27
|
## [2.0.0](https://github.com/cap-js/cds-dbs/compare/postgres-v1.14.0...postgres-v2.0.0) (2025-05-07)
|
|
8
28
|
|
|
9
29
|
|
package/lib/PostgresService.js
CHANGED
|
@@ -212,7 +212,7 @@ GROUP BY k
|
|
|
212
212
|
if (isBinary) value.setEncoding('base64')
|
|
213
213
|
value.pipe(paramStream)
|
|
214
214
|
value.on('error', err => paramStream.emit('error', err))
|
|
215
|
-
streams
|
|
215
|
+
streams.push(paramStream)
|
|
216
216
|
newValues[i] = streamID
|
|
217
217
|
sql = sql.replace(
|
|
218
218
|
new RegExp(`\\$${i + 1}`, 'g'),
|
|
@@ -283,12 +283,7 @@ GROUP BY k
|
|
|
283
283
|
return target && this.run(cds.ql.CREATE(target))
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
|
-
|
|
287
|
-
if (/('|")(\1|[^\1]*?\1)|(\?)/.exec(query)?.[3]) {
|
|
288
|
-
let i = 1
|
|
289
|
-
// eslint-disable-next-line no-unused-vars
|
|
290
|
-
req.query = query.replace(/('|")(\1|[^\1]*?\1)|(\?)/g, (a, _b, _c, d, _e, _f, _g) => (d ? '$' + i++ : a))
|
|
291
|
-
}
|
|
286
|
+
|
|
292
287
|
try {
|
|
293
288
|
return await super.onPlainSQL(req, next)
|
|
294
289
|
}
|
|
@@ -384,7 +379,7 @@ GROUP BY k
|
|
|
384
379
|
}
|
|
385
380
|
|
|
386
381
|
orderByICU(orderBy, localized) {
|
|
387
|
-
const locale = `${this.context.locale.replace('_', '-')}-x-icu`
|
|
382
|
+
const locale = this.context.locale ? `${this.context.locale.replace('_', '-')}-x-icu` : this.context.locale
|
|
388
383
|
return this._orderBy(orderBy, localized, locale)
|
|
389
384
|
}
|
|
390
385
|
|
package/package.json
CHANGED