@cap-js/postgres 1.14.1 → 1.14.2
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 +7 -0
- package/lib/PostgresService.js +8 -11
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,13 @@
|
|
|
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
|
+
## [1.14.2](https://github.com/cap-js/cds-dbs/compare/postgres-v1.14.1...postgres-v1.14.2) (2025-08-25)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
* **v1:** ensure ordering of `ParameterStream` chunks ([#1308](https://github.com/cap-js/cds-dbs/issues/1308)) ([f7872c5](https://github.com/cap-js/cds-dbs/commit/f7872c59b9aa2758fba0773b8f8671186d95901b)), closes [#1270](https://github.com/cap-js/cds-dbs/issues/1270)
|
|
13
|
+
|
|
7
14
|
## [1.14.1](https://github.com/cap-js/cds-dbs/compare/postgres-v1.14.0...postgres-v1.14.1) (2025-05-28)
|
|
8
15
|
|
|
9
16
|
|
package/lib/PostgresService.js
CHANGED
|
@@ -783,17 +783,17 @@ class ParameterStream extends Writable {
|
|
|
783
783
|
this.lengthBuffer = Buffer.from([0x64, 0, 0, 0, 0])
|
|
784
784
|
|
|
785
785
|
// Flush quote character before input stream
|
|
786
|
-
this.flushChunk = chunk => {
|
|
786
|
+
this.flushChunk = (chunk, cb) => {
|
|
787
787
|
delete this.flushChunk
|
|
788
788
|
|
|
789
789
|
this.lengthBuffer.writeUInt32BE(chunk.length + 5, 1)
|
|
790
790
|
this.connection.stream.write(this.lengthBuffer)
|
|
791
|
-
this.connection.stream.write(
|
|
792
|
-
|
|
791
|
+
this.connection.stream.write(this.constructor.sep)
|
|
792
|
+
this.connection.stream.write(chunk, cb)
|
|
793
793
|
}
|
|
794
794
|
}
|
|
795
795
|
|
|
796
|
-
static sep = String.fromCharCode(31) // Separator One
|
|
796
|
+
static sep = Buffer.from(String.fromCharCode(31)) // Separator One
|
|
797
797
|
static done = Buffer.from([0x63, 0, 0, 0, 4])
|
|
798
798
|
|
|
799
799
|
then(resolve, reject) {
|
|
@@ -844,17 +844,14 @@ class ParameterStream extends Writable {
|
|
|
844
844
|
})
|
|
845
845
|
}
|
|
846
846
|
|
|
847
|
-
flush(chunk,
|
|
848
|
-
|
|
849
|
-
return callback()
|
|
850
|
-
}
|
|
851
|
-
this.connection.stream.once('drain', callback)
|
|
847
|
+
flush(chunk, cb) {
|
|
848
|
+
this.flushChunk(chunk, cb)
|
|
852
849
|
}
|
|
853
850
|
|
|
854
|
-
flushChunk(chunk) {
|
|
851
|
+
flushChunk(chunk, cb) {
|
|
855
852
|
this.lengthBuffer.writeUInt32BE(chunk.length + 4, 1)
|
|
856
853
|
this.connection.stream.write(this.lengthBuffer)
|
|
857
|
-
|
|
854
|
+
this.connection.stream.write(chunk, cb)
|
|
858
855
|
}
|
|
859
856
|
|
|
860
857
|
handleError(e) {
|
package/package.json
CHANGED