@dbml/connector 5.6.0-alpha.0 → 5.6.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,6 +1,5 @@
1
1
  import { Client } from "pg";
2
2
  import sql from "mssql";
3
- import { flatten } from "lodash";
4
3
  import snowflake from "snowflake-sdk";
5
4
  import { BigQuery } from "@google-cloud/bigquery";
6
5
  import { readFile } from "fs/promises";
@@ -13,9 +12,9 @@ var __defProp = Object.defineProperty, __getOwnPropDesc = Object.getOwnPropertyD
13
12
  });
14
13
  return t && __defProp(n, Symbol.toStringTag, { value: "Module" }), n;
15
14
  }, __copyProps = (e, t, n, r) => {
16
- if (t && typeof t == "object" || typeof t == "function") for (var i = __getOwnPropNames(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !__hasOwnProp.call(e, s) && s !== n && __defProp(e, s, {
17
- get: ((e) => t[e]).bind(null, s),
18
- enumerable: !(r = __getOwnPropDesc(t, s)) || r.enumerable
15
+ if (t && typeof t == "object" || typeof t == "function") for (var i = __getOwnPropNames(t), a = 0, o = i.length, d; a < o; a++) d = i[a], !__hasOwnProp.call(e, d) && d !== n && __defProp(e, d, {
16
+ get: ((e) => t[e]).bind(null, d),
17
+ enumerable: !(r = __getOwnPropDesc(t, d)) || r.enumerable
19
18
  });
20
19
  return e;
21
20
  }, __toCommonJS = (e) => __hasOwnProp.call(e, "module.exports") ? e["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: !0 }), e), __require = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
@@ -1879,12 +1878,12 @@ var getValidatedClient$2 = async (t) => {
1879
1878
  case "utf-8": return A(this, t, n);
1880
1879
  case "ascii": return N(this, t, n);
1881
1880
  case "latin1":
1882
- case "binary": return Gr(this, t, n);
1881
+ case "binary": return Ei(this, t, n);
1883
1882
  case "base64": return k(this, t, n);
1884
1883
  case "ucs2":
1885
1884
  case "ucs-2":
1886
1885
  case "utf16le":
1887
- case "utf-16le": return Kr(this, t, n);
1886
+ case "utf-16le": return Di(this, t, n);
1888
1887
  default:
1889
1888
  if (r) throw TypeError("Unknown encoding: " + e);
1890
1889
  e = (e + "").toLowerCase(), r = !0;
@@ -1994,13 +1993,13 @@ var getValidatedClient$2 = async (t) => {
1994
1993
  return X(J(t, e.length - n), e, n, r);
1995
1994
  }
1996
1995
  function E(e, t, n, r) {
1997
- return X(Xr(t), e, n, r);
1996
+ return X(ji(t), e, n, r);
1998
1997
  }
1999
1998
  function D(e, t, n, r) {
2000
1999
  return X(Y(t), e, n, r);
2001
2000
  }
2002
2001
  function O(e, t, n, r) {
2003
- return X(Zr(t, e.length - n), e, n, r);
2002
+ return X(Mi(t, e.length - n), e, n, r);
2004
2003
  }
2005
2004
  s.prototype.write = function(e, t, n, r) {
2006
2005
  if (t === void 0) r = "utf8", n = this.length, t = 0;
@@ -2074,7 +2073,7 @@ var getValidatedClient$2 = async (t) => {
2074
2073
  for (let i = t; i < n; ++i) r += String.fromCharCode(e[i] & 127);
2075
2074
  return r;
2076
2075
  }
2077
- function Gr(e, t, n) {
2076
+ function Ei(e, t, n) {
2078
2077
  let r = "";
2079
2078
  n = Math.min(e.length, n);
2080
2079
  for (let i = t; i < n; ++i) r += String.fromCharCode(e[i]);
@@ -2084,10 +2083,10 @@ var getValidatedClient$2 = async (t) => {
2084
2083
  let r = e.length;
2085
2084
  (!t || t < 0) && (t = 0), (!n || n < 0 || n > r) && (n = r);
2086
2085
  let i = "";
2087
- for (let r = t; r < n; ++r) i += Qr[e[r]];
2086
+ for (let r = t; r < n; ++r) i += Ni[e[r]];
2088
2087
  return i;
2089
2088
  }
2090
- function Kr(e, t, n) {
2089
+ function Di(e, t, n) {
2091
2090
  let r = e.slice(t, n), i = "";
2092
2091
  for (let e = 0; e < r.length - 1; e += 2) i += String.fromCharCode(r[e] + r[e + 1] * 256);
2093
2092
  return i;
@@ -2347,7 +2346,7 @@ var getValidatedClient$2 = async (t) => {
2347
2346
  for (; n >= r + 4; n -= 3) t = `_${e.slice(n - 3, n)}${t}`;
2348
2347
  return `${e.slice(0, n)}${t}`;
2349
2348
  }
2350
- function qr(e, t, n) {
2349
+ function Oi(e, t, n) {
2351
2350
  K(t, "offset"), (e[t] === void 0 || e[t + n] === void 0) && q(t, e.length - (n + 1));
2352
2351
  }
2353
2352
  function G(e, t, n, r, i, a) {
@@ -2355,7 +2354,7 @@ var getValidatedClient$2 = async (t) => {
2355
2354
  let r = typeof t == "bigint" ? "n" : "", i;
2356
2355
  throw i = a > 3 ? t === 0 || t === BigInt(0) ? `>= 0${r} and < 2${r} ** ${(a + 1) * 8}${r}` : `>= -(2${r} ** ${(a + 1) * 8 - 1}${r}) and < 2 ** ${(a + 1) * 8 - 1}${r}` : `>= ${t}${r} and <= ${n}${r}`, new H.ERR_OUT_OF_RANGE("value", i, e);
2357
2356
  }
2358
- qr(r, i, a);
2357
+ Oi(r, i, a);
2359
2358
  }
2360
2359
  function K(e, t) {
2361
2360
  if (typeof e != "number") throw new H.ERR_INVALID_ARG_TYPE(t, "number", e);
@@ -2363,9 +2362,9 @@ var getValidatedClient$2 = async (t) => {
2363
2362
  function q(e, t, n) {
2364
2363
  throw Math.floor(e) === e ? t < 0 ? new H.ERR_BUFFER_OUT_OF_BOUNDS() : new H.ERR_OUT_OF_RANGE(n || "offset", `>= ${n ? 1 : 0} and <= ${t}`, e) : (K(e, n), new H.ERR_OUT_OF_RANGE(n || "offset", "an integer", e));
2365
2364
  }
2366
- var Jr = /[^+/0-9A-Za-z-_]/g;
2367
- function Yr(e) {
2368
- if (e = e.split("=")[0], e = e.trim().replace(Jr, ""), e.length < 2) return "";
2365
+ var ki = /[^+/0-9A-Za-z-_]/g;
2366
+ function Ai(e) {
2367
+ if (e = e.split("=")[0], e = e.trim().replace(ki, ""), e.length < 2) return "";
2369
2368
  for (; e.length % 4 != 0;) e += "=";
2370
2369
  return e;
2371
2370
  }
@@ -2407,18 +2406,18 @@ var getValidatedClient$2 = async (t) => {
2407
2406
  }
2408
2407
  return a;
2409
2408
  }
2410
- function Xr(e) {
2409
+ function ji(e) {
2411
2410
  let t = [];
2412
2411
  for (let n = 0; n < e.length; ++n) t.push(e.charCodeAt(n) & 255);
2413
2412
  return t;
2414
2413
  }
2415
- function Zr(e, t) {
2414
+ function Mi(e, t) {
2416
2415
  let n, r, i, a = [];
2417
2416
  for (let o = 0; o < e.length && !((t -= 2) < 0); ++o) n = e.charCodeAt(o), r = n >> 8, i = n % 256, a.push(i), a.push(r);
2418
2417
  return a;
2419
2418
  }
2420
2419
  function Y(e) {
2421
- return t.toByteArray(Yr(e));
2420
+ return t.toByteArray(Ai(e));
2422
2421
  }
2423
2422
  function X(e, t, n, r) {
2424
2423
  let i;
@@ -2431,7 +2430,7 @@ var getValidatedClient$2 = async (t) => {
2431
2430
  function Q(e) {
2432
2431
  return e !== e;
2433
2432
  }
2434
- var Qr = (function() {
2433
+ var Ni = (function() {
2435
2434
  let e = "0123456789abcdef", t = Array(256);
2436
2435
  for (let n = 0; n < 16; ++n) {
2437
2436
  let r = n * 16;
@@ -2440,9 +2439,9 @@ var getValidatedClient$2 = async (t) => {
2440
2439
  return t;
2441
2440
  })();
2442
2441
  function $(e) {
2443
- return typeof BigInt > "u" ? $r : e;
2442
+ return typeof BigInt > "u" ? Pi : e;
2444
2443
  }
2445
- function $r() {
2444
+ function Pi() {
2446
2445
  throw Error("BigInt not supported");
2447
2446
  }
2448
2447
  })), require_umd = /* @__PURE__ */ __commonJSMin(((e, t) => {
@@ -8396,7 +8395,7 @@ var getValidatedClient$2 = async (t) => {
8396
8395
  }
8397
8396
  t.exports = s, t.exports.toNumbered = c;
8398
8397
  })), require_connection = /* @__PURE__ */ __commonJSMin(((e, t) => {
8399
- var n = __require("net"), r = __require("tls"), i = __require("timers"), a = require_events().EventEmitter, o = __require("stream").Readable, s = require_denque(), c = require_sqlstring(), l = require_index_cjs().default, u = require_packet_parser(), d = require_packets(), f = require_commands(), p = require_connection_config(), m = require_charset_encodings(), h = 0, g = null;
8398
+ var n = __require("net"), r = __require("tls"), i = __require("timers"), a = require_events().EventEmitter, o = __require("stream").Readable, s = require_denque(), c = require_sqlstring(), l = require_index_cjs().default, u = require_packet_parser(), d = require_packets(), f = require_commands(), p = require_connection_config(), m = require_charset_encodings(), h = 0, _ = null;
8400
8399
  t.exports = class e extends a {
8401
8400
  constructor(e) {
8402
8401
  super(), this.config = e.config, e.config.stream ? typeof e.config.stream == "function" ? this.stream = e.config.stream(e) : this.stream = e.config.stream : e.config.socketPath ? this.stream = n.connect(e.config.socketPath) : (this.stream = n.connect(e.config.port, e.config.host), this.config.enableKeepAlive && this.stream.on("connect", () => {
@@ -8597,7 +8596,7 @@ var getValidatedClient$2 = async (t) => {
8597
8596
  let t;
8598
8597
  if (this.config.namedPlaceholders || e.namedPlaceholders) {
8599
8598
  if (Array.isArray(e.values)) return;
8600
- g === null && (g = require_named_placeholders()()), t = g(e.sql, e.values), e.sql = t[0], e.values = t[1];
8599
+ _ === null && (_ = require_named_placeholders()()), t = _(e.sql, e.values), e.sql = t[0], e.values = t[1];
8601
8600
  }
8602
8601
  }
8603
8602
  query(t, n, r) {
@@ -9359,7 +9358,59 @@ var getValidatedClient$2 = async (t) => {
9359
9358
  }, e.clearParserCache = function() {
9360
9359
  r.clearCache();
9361
9360
  };
9362
- })), import_promise = require_promise(), NUMBER_REGEX = "^-?[0-9]+(.[0-9]+)?$";
9361
+ })), _freeGlobal_default = typeof global == "object" && global && global.Object === Object && global, freeSelf = typeof self == "object" && self && self.Object === Object && self, _Symbol_default = (_freeGlobal_default || freeSelf || Function("return this")()).Symbol, objectProto$1 = Object.prototype, hasOwnProperty$1 = objectProto$1.hasOwnProperty, nativeObjectToString$1 = objectProto$1.toString, symToStringTag$1 = _Symbol_default ? _Symbol_default.toStringTag : void 0;
9362
+ function getRawTag(e) {
9363
+ var t = hasOwnProperty$1.call(e, symToStringTag$1), n = e[symToStringTag$1];
9364
+ try {
9365
+ e[symToStringTag$1] = void 0;
9366
+ var r = !0;
9367
+ } catch {}
9368
+ var i = nativeObjectToString$1.call(e);
9369
+ return r && (t ? e[symToStringTag$1] = n : delete e[symToStringTag$1]), i;
9370
+ }
9371
+ var _getRawTag_default = getRawTag, nativeObjectToString = Object.prototype.toString;
9372
+ function objectToString(e) {
9373
+ return nativeObjectToString.call(e);
9374
+ }
9375
+ var _objectToString_default = objectToString, nullTag = "[object Null]", undefinedTag = "[object Undefined]", symToStringTag = _Symbol_default ? _Symbol_default.toStringTag : void 0;
9376
+ function baseGetTag(e) {
9377
+ return e == null ? e === void 0 ? undefinedTag : nullTag : symToStringTag && symToStringTag in Object(e) ? _getRawTag_default(e) : _objectToString_default(e);
9378
+ }
9379
+ var _baseGetTag_default = baseGetTag;
9380
+ function isObjectLike(e) {
9381
+ return typeof e == "object" && !!e;
9382
+ }
9383
+ var isObjectLike_default = isObjectLike, isArray_default = Array.isArray, argsTag = "[object Arguments]";
9384
+ function baseIsArguments(e) {
9385
+ return isObjectLike_default(e) && _baseGetTag_default(e) == argsTag;
9386
+ }
9387
+ var _baseIsArguments_default = baseIsArguments, objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty, propertyIsEnumerable = objectProto.propertyIsEnumerable, isArguments_default = _baseIsArguments_default(function() {
9388
+ return arguments;
9389
+ }()) ? _baseIsArguments_default : function(e) {
9390
+ return isObjectLike_default(e) && hasOwnProperty.call(e, "callee") && !propertyIsEnumerable.call(e, "callee");
9391
+ };
9392
+ function arrayPush(e, t) {
9393
+ for (var n = -1, r = t.length, i = e.length; ++n < r;) e[i + n] = t[n];
9394
+ return e;
9395
+ }
9396
+ var _arrayPush_default = arrayPush, spreadableSymbol = _Symbol_default ? _Symbol_default.isConcatSpreadable : void 0;
9397
+ function isFlattenable(e) {
9398
+ return isArray_default(e) || isArguments_default(e) || !!(spreadableSymbol && e && e[spreadableSymbol]);
9399
+ }
9400
+ var _isFlattenable_default = isFlattenable;
9401
+ function baseFlatten(e, t, n, r, i) {
9402
+ var a = -1, o = e.length;
9403
+ for (n ||= _isFlattenable_default, i ||= []; ++a < o;) {
9404
+ var s = e[a];
9405
+ t > 0 && n(s) ? t > 1 ? baseFlatten(s, t - 1, n, r, i) : _arrayPush_default(i, s) : r || (i[i.length] = s);
9406
+ }
9407
+ return i;
9408
+ }
9409
+ var _baseFlatten_default = baseFlatten;
9410
+ function flatten(e) {
9411
+ return e != null && e.length ? _baseFlatten_default(e, 1) : [];
9412
+ }
9413
+ var flatten_default = flatten, import_promise = require_promise(), NUMBER_REGEX = "^-?[0-9]+(.[0-9]+)?$";
9363
9414
  async function connectMySQL(e) {
9364
9415
  let t = await (0, import_promise.createConnection)(e);
9365
9416
  try {
@@ -9436,7 +9487,7 @@ async function generateEnums(e, t) {
9436
9487
  });
9437
9488
  }
9438
9489
  async function generateIndexes$3(e, t) {
9439
- let r = (await e.query("\n with\n pk_fk_uniques as (\n select constraint_name, table_name\n from information_schema.table_constraints\n where table_schema = ?\n )\n select\n st.table_name as tableName,\n case\n when st.non_unique = 0 then true\n else false\n end as isIdxUnique,\n st.index_name as idxName,\n st.column_name as columnName,\n st.sub_part as idxSubPart,\n st.index_type as idxType,\n replace(st.expression, '`', '') as idxExpression\n from information_schema.statistics st\n where\n st.table_schema = ?\n and st.index_name not in (\n select constraint_name\n from pk_fk_uniques pfu\n where pfu.table_name = st.table_name\n )\n and st.index_type in ('BTREE', 'HASH')\n group by\n st.table_name, st.non_unique, st.index_name, st.column_name, st.sub_part, st.index_type, st.expression\n order by st.index_name;\n ", [t, t]))[0].reduce((e, t) => {
9490
+ let n = (await e.query("\n with\n pk_fk_uniques as (\n select constraint_name, table_name\n from information_schema.table_constraints\n where table_schema = ?\n )\n select\n st.table_name as tableName,\n case\n when st.non_unique = 0 then true\n else false\n end as isIdxUnique,\n st.index_name as idxName,\n st.column_name as columnName,\n st.sub_part as idxSubPart,\n st.index_type as idxType,\n replace(st.expression, '`', '') as idxExpression\n from information_schema.statistics st\n where\n st.table_schema = ?\n and st.index_name not in (\n select constraint_name\n from pk_fk_uniques pfu\n where pfu.table_name = st.table_name\n )\n and st.index_type in ('BTREE', 'HASH')\n group by\n st.table_name, st.non_unique, st.index_name, st.column_name, st.sub_part, st.index_type, st.expression\n order by st.index_name;\n ", [t, t]))[0].reduce((e, t) => {
9440
9491
  let { tableName: n, idxName: r, idxType: i, isIdxUnique: a, columnName: o, idxExpression: s, idxSubPart: c } = t, l = n;
9441
9492
  e[l] || (e[l] = {}), e[l][r] || (e[l][r] = {
9442
9493
  name: r,
@@ -9446,13 +9497,13 @@ async function generateIndexes$3(e, t) {
9446
9497
  });
9447
9498
  let u = e[l][r], d = getIndexColumn(o, s, c);
9448
9499
  return d && u.columns.push(d), e;
9449
- }, {}), i = {};
9450
- return Object.keys(r).forEach((e) => {
9451
- i[e] = flatten(Object.values(r[e]));
9452
- }), i;
9500
+ }, {}), r = {};
9501
+ return Object.keys(n).forEach((e) => {
9502
+ r[e] = flatten_default(Object.values(n[e]));
9503
+ }), r;
9453
9504
  }
9454
9505
  async function generatePrimaryAndUniqueConstraint(e, t) {
9455
- let r = (await e.query("\n select\n tc.table_name as tableName,\n tc.constraint_name as constraintName,\n group_concat(kcu.column_name order by kcu.ordinal_position separator ',') as columnNames,\n count(kcu.column_name) as columnCount,\n tc.constraint_type as constraintType\n from information_schema.table_constraints tc\n join information_schema.key_column_usage kcu\n on\n tc.constraint_schema = kcu.constraint_schema\n and tc.constraint_name = kcu.constraint_name\n and tc.table_name = kcu.table_name\n where\n (tc.constraint_type = 'PRIMARY KEY' or tc.constraint_type = 'UNIQUE')\n and tc.table_schema = ?\n group by tc.table_name, tc.constraint_name, tc.constraint_type\n order by tc.table_name, tc.constraint_name;\n ", [t]))[0], i = r.filter((e) => e.columnCount === 1), a = r.filter((e) => e.columnCount > 1).reduce((e, t) => {
9506
+ let n = (await e.query("\n select\n tc.table_name as tableName,\n tc.constraint_name as constraintName,\n group_concat(kcu.column_name order by kcu.ordinal_position separator ',') as columnNames,\n count(kcu.column_name) as columnCount,\n tc.constraint_type as constraintType\n from information_schema.table_constraints tc\n join information_schema.key_column_usage kcu\n on\n tc.constraint_schema = kcu.constraint_schema\n and tc.constraint_name = kcu.constraint_name\n and tc.table_name = kcu.table_name\n where\n (tc.constraint_type = 'PRIMARY KEY' or tc.constraint_type = 'UNIQUE')\n and tc.table_schema = ?\n group by tc.table_name, tc.constraint_name, tc.constraint_type\n order by tc.table_name, tc.constraint_name;\n ", [t]))[0], r = n.filter((e) => e.columnCount === 1), i = n.filter((e) => e.columnCount > 1).reduce((e, t) => {
9456
9507
  let { tableName: n, constraintName: r, columnNames: i, constraintType: a } = t, o = n;
9457
9508
  e[o] || (e[o] = {}), e[o][r] || (e[o][r] = { name: r }), a === "PRIMARY KEY" && (e[o][r].pk = !0), a === "UNIQUE" && (e[o][r].unique = !0);
9458
9509
  let s = i.split(",").map((e) => ({
@@ -9460,12 +9511,12 @@ async function generatePrimaryAndUniqueConstraint(e, t) {
9460
9511
  value: e
9461
9512
  }));
9462
9513
  return e[o][r].columns = s, e;
9463
- }, {}), o = {};
9464
- return Object.keys(a).forEach((e) => {
9465
- o[e] = flatten(Object.values(a[e]));
9514
+ }, {}), a = {};
9515
+ return Object.keys(i).forEach((e) => {
9516
+ a[e] = flatten_default(Object.values(i[e]));
9466
9517
  }), {
9467
- compositeConstraintMap: o,
9468
- primaryAndUniqueConstraintMap: i.reduce((e, t) => {
9518
+ compositeConstraintMap: a,
9519
+ primaryAndUniqueConstraintMap: r.reduce((e, t) => {
9469
9520
  let { tableName: n, columnNames: r, constraintType: i } = t, a = n;
9470
9521
  return e[a] || (e[a] = {}), r.split(",").forEach((t) => {
9471
9522
  e[a][t] || (e[a][t] = { checks: [] }), i === "PRIMARY KEY" && (e[a][t].pk = !0), i === "UNIQUE" && !e[a][t].pk && (e[a][t].unique = !0);
@@ -9578,10 +9629,10 @@ var parseConnectionString = (e) => {
9578
9629
  "DEBUG",
9579
9630
  "TRACE"
9580
9631
  ].includes(e), connectToSnowflake = async (e) => {
9581
- let t = isLogLevel(e.LOG_LEVEL) ? e.LOG_LEVEL : "INFO", n = e.IS_DEBUG_MODE === "true";
9632
+ let t = isLogLevel(e.LOG_LEVEL) ? e.LOG_LEVEL : "INFO", r = e.IS_DEBUG_MODE === "true";
9582
9633
  snowflake.configure({
9583
9634
  logLevel: t,
9584
- additionalLogToConsole: n
9635
+ additionalLogToConsole: r
9585
9636
  });
9586
9637
  let i = {};
9587
9638
  switch (e.AUTHENTICATOR) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package",
3
3
  "name": "@dbml/connector",
4
- "version": "5.6.0-alpha.0",
4
+ "version": "5.6.0-alpha.2",
5
5
  "description": "This package was created to fetch the schema JSON from many kind of databases.",
6
6
  "author": "huy.phung.sw@gmail.com",
7
7
  "license": "MIT",
@@ -10,7 +10,6 @@
10
10
  "main": "dist/index.js",
11
11
  "types": "dist/index.d.ts",
12
12
  "devDependencies": {
13
- "@types/lodash": "^4.17.16",
14
13
  "@types/mssql": "^9.1.5",
15
14
  "@types/node": "^22.2.0",
16
15
  "@types/oracledb": "^6.10.0",
@@ -29,7 +28,7 @@
29
28
  },
30
29
  "dependencies": {
31
30
  "@google-cloud/bigquery": "^7.9.0",
32
- "lodash": "^4.17.21",
31
+ "lodash-es": "^4.17.21",
33
32
  "mssql": "^11.0.1",
34
33
  "mysql2": "^3.11.0",
35
34
  "oracledb": "^6.10.0",
@@ -39,5 +38,5 @@
39
38
  "engines": {
40
39
  "node": ">=18"
41
40
  },
42
- "gitHead": "e0cd0b00099344c05af0a83e30c2c9c2ccc325cc"
41
+ "gitHead": "1c7351657e2fc9dffcdf96770c79ac8a333f6f76"
43
42
  }
@@ -1,5 +1,5 @@
1
1
  import { createConnection, Connection } from 'mysql2/promise';
2
- import { flatten } from 'lodash';
2
+ import { flatten } from 'lodash-es';
3
3
  import {
4
4
  CheckConstraintDictionary, DefaultInfo, DatabaseSchema, DefaultType, Field, IndexColumn, FieldsDictionary, Table, Enum, IndexesDictionary, TableConstraintsDictionary, Index, Ref,
5
5
  } from '../types';