vertica / vertica-nodejs

Official native node.js client for the Vertica Analytics Database.
https://www.vertica.com/
Apache License 2.0
12 stars 14 forks source link

Support for copy local stdin #130

Closed DMickens closed 7 months ago

DMickens commented 7 months ago

Modifications required for COPY FROM LOCAL stdin. Most significant changes are to the protocol message handlers, now we utilize the values in some of the backend messages for identifying whether we are running a copy from local file or copy from local stdin mode, and proceed with the proper frontend message responses.

To perform a copy from local stdin operation, the user must supply the input stream as a config parameter in the query() call. We now support any input stream that is an instance of stream.Readable, both binary and utf-8 encoded.

I split the tests for copy from local file and local stdin into separate test files to avoid becoming too large.