You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const pool = new Pool(config.database_config);
const copyFrom = require('pg-copy-streams').from;
const { Readable } = require('stream');
const createCsvWriter = require('csv-writer').createArrayCsvStringifier
[...]
var target = db.query(copyFrom(`COPY temptable (a,b,c) FROM STDIN DELIMITER ';' CSV HEADER':''}`));
var source = Readable.from(await csvWriter.stringifyRecords(table_data));
source.pipe(target);
The target variable is not of type Promise it is of type CopyStreamQuery extending Writeable. This of course ends in the error:
TypeError: queryResult.then is not a function
at Client.query (D:\home\site\wwwroot\node_modules\diagnostic-channel-publishers\dist\src\pg.pub.js:245:18)
When executing a pg_copy_stream:
The target variable is not of type Promise it is of type CopyStreamQuery extending Writeable. This of course ends in the error:
versions:
"applicationinsights" pull dependency to:
The text was updated successfully, but these errors were encountered: