mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-05-03 15:13:57 +00:00
fixed bulk import
This commit is contained in:
@@ -11,7 +11,9 @@ class ReportingTransform extends stream.Transform {
|
|||||||
this.reporter = reporter;
|
this.reporter = reporter;
|
||||||
}
|
}
|
||||||
_transform(chunk, encoding, callback) {
|
_transform(chunk, encoding, callback) {
|
||||||
this.reporter.add(1);
|
if (!chunk?.__isStreamHeader) {
|
||||||
|
this.reporter.add(1);
|
||||||
|
}
|
||||||
this.push(chunk);
|
this.push(chunk);
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ function runBulkInsertBatch(dbhan, tableName, writable, rows) {
|
|||||||
function createTediousBulkInsertStream(driver, stream, dbhan, name, options) {
|
function createTediousBulkInsertStream(driver, stream, dbhan, name, options) {
|
||||||
const writable = createBulkInsertStreamBase(driver, stream, dbhan, name, options);
|
const writable = createBulkInsertStreamBase(driver, stream, dbhan, name, options);
|
||||||
|
|
||||||
const fullName = name.schemaName ? `[${name.schemaName}].[${name.pureName}]` : name.pureName;
|
const fullName = name.schemaName ? `[${name.schemaName}].[${name.pureName}]` : `[${name.pureName}]`;
|
||||||
|
|
||||||
writable.send = async () => {
|
writable.send = async () => {
|
||||||
if (!writable.templateColumns) {
|
if (!writable.templateColumns) {
|
||||||
|
|||||||
Reference in New Issue
Block a user