mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 16:36:00 +00:00
export CSV from mysql test
This commit is contained in:
10
packages/api/src/shell/copyStream.js
Normal file
10
packages/api/src/shell/copyStream.js
Normal file
@@ -0,0 +1,10 @@
|
||||
function copyStream(input, output) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const finisher = output['finisher'] || output;
|
||||
finisher.on('finish', resolve);
|
||||
finisher.on('error', reject);
|
||||
input.pipe(output);
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = copyStream;
|
||||
Reference in New Issue
Block a user