renamed dbgate packages, because of npmjs policy

This commit is contained in:
Jan Prochazka
2020-11-16 21:59:08 +01:00
parent 09b26319f0
commit f7ebcd9537
96 changed files with 179 additions and 179 deletions

View File

@@ -4,15 +4,15 @@ const fp = require('lodash/fp');
class DatabaseAnalyser {
/**
*
* @param {import('@dbgate/types').EngineDriver} driver
* @param {import('dbgate-types').EngineDriver} driver
*/
constructor(pool, driver) {
this.pool = pool;
this.driver = driver;
// this.result = DatabaseAnalyser.createEmptyStructure();
/** @type {import('@dbgate/types').DatabaseInfo} */
/** @type {import('dbgate-types').DatabaseInfo} */
this.structure = null;
/** import('@dbgate/types').DatabaseModification[]) */
/** import('dbgate-types').DatabaseModification[]) */
this.modifications = null;
this.singleObjectFilter = null;
}
@@ -21,7 +21,7 @@ class DatabaseAnalyser {
return DatabaseAnalyser.createEmptyStructure();
}
/** @returns {Promise<import('@dbgate/types').DatabaseModification[]>} */
/** @returns {Promise<import('dbgate-types').DatabaseModification[]>} */
async getModifications() {
if (this.structure == null) throw new Error('DatabaseAnalyse.getModifications - structure must be filled');
@@ -82,7 +82,7 @@ class DatabaseAnalyser {
// }
}
/** @returns {import('@dbgate/types').DatabaseInfo} */
/** @returns {import('dbgate-types').DatabaseInfo} */
DatabaseAnalyser.createEmptyStructure = () => ({
tables: [],
views: [],

View File

@@ -2,7 +2,7 @@ const _ = require('lodash');
const moment = require('moment');
class SqlDumper {
/** @param driver {import('@dbgate/types').EngineDriver} */
/** @param driver {import('dbgate-types').EngineDriver} */
constructor(driver) {
this.s = '';
this.driver = driver;
@@ -150,7 +150,7 @@ class SqlDumper {
}
/**
* @param column {import('@dbgate/types').ColumnInfo}
* @param column {import('dbgate-types').ColumnInfo}
*/
columnDefinition(column, { includeDefault = true, includeNullable = true, includeCollate = true } = {}) {
if (column.computedExpression) {
@@ -176,7 +176,7 @@ class SqlDumper {
}
/**
* @param column {import('@dbgate/types').ColumnInfo}
* @param column {import('dbgate-types').ColumnInfo}
*/
columnDefault(column) {
if (column.defaultConstraint != null) {
@@ -202,7 +202,7 @@ class SqlDumper {
}
}
/** @param table {import('@dbgate/types').TableInfo} */
/** @param table {import('dbgate-types').TableInfo} */
createTable(table) {
this.put('^create ^table %f ( &>&n', table);
this.putCollection(',&n', table.columns, (col) => {
@@ -245,7 +245,7 @@ class SqlDumper {
// }
}
/** @param fk {import('@dbgate/types').ForeignKeyInfo} */
/** @param fk {import('dbgate-types').ForeignKeyInfo} */
createForeignKeyFore(fk) {
if (fk.constraintName != null) this.put('^constraint %i ', fk.constraintName);
this.put(
@@ -258,13 +258,13 @@ class SqlDumper {
if (fk.updateAction) this.put(' ^on ^update %k', fk.updateAction);
}
/** @param type {import('@dbgate/types').TransformType} */
/** @param type {import('dbgate-types').TransformType} */
transform(type, dumpExpr) {
dumpExpr();
}
/**
* @param table {import('@dbgate/types').NamedObjectInfo}
* @param table {import('dbgate-types').NamedObjectInfo}
* @param allow {boolean}
*/
allowIdentityInsert(table, allow) {}

View File

@@ -1,9 +1,9 @@
const { prepareTableForImport } = require('@dbgate/tools');
const { prepareTableForImport } = require('dbgate-tools');
const _ = require('lodash');
/**
*
* @param {import('@dbgate/types').EngineDriver} driver
* @param {import('dbgate-types').EngineDriver} driver
*/
function createBulkInsertStreamBase(driver, stream, pool, name, options) {
const fullNameQuoted = name.schemaName