pg-copy-streams
Advanced tools
Comparing version 6.0.5 to 6.0.6
@@ -132,6 +132,3 @@ 'use strict' | ||
case code.CopyOutResponse: | ||
break | ||
case code.CopyData: | ||
this.rowCount++ | ||
break | ||
// standard interspersed messages. | ||
@@ -173,5 +170,10 @@ // see https://www.postgresql.org/docs/9.6/protocol-flow.html#PROTOCOL-COPY | ||
handleCommandComplete() {} | ||
handleCommandComplete(msg) { | ||
const match = /COPY (\d+)/.exec((msg || {}).text) | ||
if (match) { | ||
this.rowCount = parseInt(match[1], 10) | ||
} | ||
} | ||
handleReadyForQuery() {} | ||
} |
{ | ||
"name": "pg-copy-streams", | ||
"version": "6.0.5", | ||
"version": "6.0.6", | ||
"description": "Low-Level COPY TO and COPY FROM streams for PostgreSQL in JavaScript using", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -19,3 +19,3 @@ ## pg-copy-streams | ||
If you're not familiar with the feature (I wasn't either) you can read this for some good helps: http://www.postgresql.org/docs/9.6/static/sql-copy.html | ||
If you're not familiar with the feature (I wasn't either) you can read this for some good helps: https://www.postgresql.org/docs/current/sql-copy.html | ||
@@ -170,2 +170,6 @@ ## examples | ||
### version 6.0.6 - published 2023-07-17 | ||
- copy-to: fix rowCount in BINARY mode. The file trailer was incorrectly counted as a row | ||
### version 6.0.5 - published 2023-03-07 | ||
@@ -172,0 +176,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36999
599
304