reduce dbgate-tools package size

This commit is contained in:
Jan Prochazka
2020-11-24 19:06:05 +01:00
parent 5862a2cdc4
commit 556a35f4ba
7 changed files with 27 additions and 30 deletions

View File

@@ -1,5 +1,5 @@
import { EngineDriver } from 'dbgate-types';
import _ from 'lodash';
import _intersection from 'lodash/intersection';
import { prepareTableForImport } from './tableTransforms';
export function createBulkInsertStreamBase(driver, stream, pool, name, options): any {
@@ -43,7 +43,7 @@ export function createBulkInsertStreamBase(driver, stream, pool, name, options):
await driver.query(pool, `TRUNCATE TABLE ${fullNameQuoted}`);
}
this.columnNames = _.intersection(
this.columnNames = _intersection(
structure.columns.map((x) => x.columnName),
writable.structure.columns.map((x) => x.columnName)
);