@dbml/core 9.0.0-optional-ref.6 → 9.0.0-optional-ref.8

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/lib/index.mjs CHANGED
@@ -4809,7 +4809,7 @@ function kp(e) {
4809
4809
  //#region src/model_structure/config.js
4810
4810
  var Ap = "public", tte = "table", nte = "note", rte = "enum", ite = "table_group";
4811
4811
  //#endregion
4812
- //#region src/export/utils.js
4812
+ //#region src/export/utils.ts
4813
4813
  function ate(e) {
4814
4814
  return /\s/g.test(e);
4815
4815
  }
@@ -1799298,7 +1799298,7 @@ var GAe = { REF: "ref" }, KAe = { TABLE: "table" }, X7 = (e, t, n) => {
1799298
1799298
  };
1799299
1799299
  }
1799300
1799300
  if (e.REFERENCES()) {
1799301
- let t = e.qualified_name().accept(this), n = Lc(t), r = t.length > 1 ? t[t.length - 2] : void 0, i = e.column_list_()?.accept(this)?.map((e) => e.value), a = e.key_actions(), o = a ? a.accept(this) : {
1799301
+ let n = e.qualified_name().accept(this), i = Lc(n), a = n.length > 1 ? n[n.length - 2] : void 0, o = e.column_list_()?.accept(this)?.map((e) => e.value), s = e.key_actions(), c = s ? s.accept(this) : {
1799302
1799302
  onDelete: null,
1799303
1799303
  onUpdate: null
1799304
1799304
  };
@@ -1799309,15 +1799309,15 @@ var GAe = { REF: "ref" }, KAe = { TABLE: "table" }, X7 = (e, t, n) => {
1799309
1799309
  tableName: null,
1799310
1799310
  schemaName: null,
1799311
1799311
  fieldNames: null,
1799312
- relation: "*"
1799312
+ relation: t
1799313
1799313
  }, {
1799314
- tableName: n,
1799315
- schemaName: r,
1799316
- fieldNames: i,
1799317
- relation: "1"
1799314
+ tableName: i,
1799315
+ schemaName: a,
1799316
+ fieldNames: o,
1799317
+ relation: r
1799318
1799318
  }],
1799319
- onDelete: o.onDelete,
1799320
- onUpdate: o.onUpdate
1799319
+ onDelete: c.onDelete,
1799320
+ onUpdate: c.onUpdate
1799321
1799321
  }
1799322
1799322
  };
1799323
1799323
  }
@@ -1811307,12 +1811307,12 @@ function tFe(e) {
1811307
1811307
  }
1811308
1811308
  //#endregion
1811309
1811309
  //#region src/utils/version.ts
1811310
- var nFe = "9.0.0-optional-ref.6";
1811310
+ var nFe = "9.0.0-optional-ref.8";
1811311
1811311
  //#endregion
1811312
1811312
  //#region src/transform/relations.ts
1811313
1811313
  function rFe(e, n) {
1811314
- let i = e.pk || e.unique, o = n.pk || n.unique, c = e.not_null || e.pk, l = n.not_null || n.pk;
1811315
- return [i ? l ? a : r : l ? s : t, o ? c ? a : r : c ? s : t];
1811314
+ let i = e.pk || e.unique || e.increment, o = n.pk || n.unique || n.increment, c = e.not_null || e.pk || e.increment, l = n.not_null || n.pk || n.increment, u, d;
1811315
+ return i && o ? (u = r, d = c ? a : r) : !i && !o ? (u = l ? s : t, d = c ? s : t) : (u = i ? l ? a : r : t, d = o ? c ? a : r : t), [u, d];
1811316
1811316
  }
1811317
1811317
  //#endregion
1811318
1811318
  export { e as CARDINALITY_MANY, n as CARDINALITY_MAYBE, i as CARDINALITY_ONE, o as CARDINALITY_SOME, W7 as CompilerError, l as DEFAULT_ENTRY, d as Filepath, $9 as ModelExporter, RPe as Parser, nFe as VERSION, m as addDoubleQuoteIfNeeded, g as dbmlMonarchTokensProvider, HPe as exporter, tFe as findDiagramViewBlocks, _ as formatRecordValue, y as getMultiplicities, b as getRelationshipOp, QPe as importer, rFe as inferMultiplicitiesFromColumns, ee as isBinaryType, ne as isBooleanType, ie as isDateTimeType, oe as isFloatType, se as isIntegerType, ce as isNumericType, ue as isSerialType, de as isStringType, $Pe as renameTable, eFe as syncDiagramView, he as tryExtractBoolean, ge as tryExtractDateTime, ve as tryExtractEnum, ye as tryExtractInteger, be as tryExtractNumeric, xe as tryExtractString };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package",
3
3
  "name": "@dbml/core",
4
- "version": "9.0.0-optional-ref.6",
4
+ "version": "9.0.0-optional-ref.8",
5
5
  "description": "> TODO: description",
6
6
  "author": "Holistics <dev@holistics.io>",
7
7
  "license": "Apache-2.0",
@@ -46,7 +46,7 @@
46
46
  "lint:fix": "eslint --fix ."
47
47
  },
48
48
  "dependencies": {
49
- "@dbml/parse": "^9.0.0-optional-ref.6",
49
+ "@dbml/parse": "^9.0.0-optional-ref.8",
50
50
  "antlr4": "^4.13.1",
51
51
  "lodash": "^4.18.1",
52
52
  "lodash-es": "^4.18.1",
@@ -57,7 +57,7 @@
57
57
  "devDependencies": {
58
58
  "bluebird": "^3.5.5"
59
59
  },
60
- "gitHead": "9d8aa4b58c6ceae262252ea590e05e3e966c10e6",
60
+ "gitHead": "f70d4bfbf56addaab11a3877928897be44c157a7",
61
61
  "engines": {
62
62
  "node": ">=16"
63
63
  }