@dbml/core 3.13.5 → 3.13.7-alpha.0
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/export/DbmlExporter.js +8 -10
- package/lib/export/JsonExporter.js +8 -10
- package/lib/export/ModelExporter.js +9 -11
- package/lib/export/MysqlExporter.js +14 -16
- package/lib/export/OracleExporter.js +17 -19
- package/lib/export/PostgresExporter.js +16 -18
- package/lib/export/SqlServerExporter.js +14 -16
- package/lib/export/index.js +3 -4
- package/lib/export/utils.js +4 -0
- package/lib/import/index.js +3 -4
- package/lib/index.js +1 -1
- package/lib/model_structure/config.js +6 -12
- package/lib/model_structure/database.js +22 -26
- package/lib/model_structure/dbState.js +9 -11
- package/lib/model_structure/element.js +22 -25
- package/lib/model_structure/endpoint.js +26 -29
- package/lib/model_structure/enum.js +21 -24
- package/lib/model_structure/enumValue.js +21 -24
- package/lib/model_structure/field.js +21 -24
- package/lib/model_structure/indexColumn.js +21 -24
- package/lib/model_structure/indexes.js +21 -24
- package/lib/model_structure/ref.js +21 -24
- package/lib/model_structure/schema.js +21 -24
- package/lib/model_structure/stickyNote.js +21 -24
- package/lib/model_structure/table.js +26 -29
- package/lib/model_structure/tableGroup.js +21 -24
- package/lib/model_structure/tablePartial.js +21 -24
- package/lib/parse/ANTLR/ASTGeneration/AST.js +21 -35
- package/lib/parse/ANTLR/ASTGeneration/ParserErrorListener.js +19 -22
- package/lib/parse/ANTLR/ASTGeneration/SyntaxError.js +21 -23
- package/lib/parse/ANTLR/ASTGeneration/constants.js +5 -9
- package/lib/parse/ANTLR/ASTGeneration/index.js +1 -1
- package/lib/parse/ANTLR/ASTGeneration/mssql/MssqlASTGen.js +55 -58
- package/lib/parse/ANTLR/ASTGeneration/mysql/MySQLASTGen.js +54 -58
- package/lib/parse/ANTLR/ASTGeneration/postgres/PostgreSQLLexerBase.js +17 -19
- package/lib/parse/ANTLR/ASTGeneration/postgres/PostgreSQLParserBase.js +17 -19
- package/lib/parse/ANTLR/ASTGeneration/postgres/PostgresASTGen.js +38 -42
- package/lib/parse/ANTLR/ASTGeneration/snowflake/SnowflakeASTGen.js +28 -31
- package/lib/parse/ANTLR/parsers/mssql/TSqlLexer.js +19 -21
- package/lib/parse/ANTLR/parsers/mssql/TSqlParser.js +2 -2
- package/lib/parse/ANTLR/parsers/mssql/TSqlParserVisitor.js +19 -22
- package/lib/parse/ANTLR/parsers/mysql/MySqlLexer.js +19 -21
- package/lib/parse/ANTLR/parsers/mysql/MySqlParser.js +2 -2
- package/lib/parse/ANTLR/parsers/mysql/MySqlParserVisitor.js +19 -22
- package/lib/parse/ANTLR/parsers/postgresql/PostgreSQLLexer.js +20 -23
- package/lib/parse/ANTLR/parsers/postgresql/PostgreSQLParser.js +2 -2
- package/lib/parse/ANTLR/parsers/postgresql/PostgreSQLParserVisitor.js +19 -22
- package/lib/parse/ANTLR/parsers/snowflake/SnowflakeLexer.js +19 -21
- package/lib/parse/ANTLR/parsers/snowflake/SnowflakeParser.js +2 -2
- package/lib/parse/ANTLR/parsers/snowflake/SnowflakeParserVisitor.js +19 -22
- package/lib/parse/Parser.js +9 -11
- package/lib/parse/buildParser.js +6 -6
- package/lib/parse/databaseGenerator.js +3 -4
- package/lib/parse/dbmlParser.js +11 -11
- package/lib/parse/error.js +8 -10
- package/lib/parse/mssql/constraint_definition/actions.js +6 -7
- package/lib/parse/mssql/statements/statement_types/comments/index.js +5 -5
- package/lib/parse/mssql/statements/statement_types/create_table/actions.js +6 -6
- package/lib/parse/mssql/utils.js +1 -1
- package/lib/parse/mssqlParser.js +2 -3
- package/lib/parse/mysqlParser.js +11 -11
- package/lib/parse/postgresParser.js +1 -1
- package/lib/parse/postgresql/get_parser.js +1 -1
- package/lib/parse/schemarbParser.js +8 -10
- package/lib/utils/version.js +1 -2
- package/package.json +6 -3
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
|
|
7
7
|
"use strict";
|
|
8
8
|
|
|
9
|
-
function _typeof(
|
|
10
|
-
function ownKeys(
|
|
11
|
-
function _objectSpread(
|
|
12
|
-
function _defineProperty(
|
|
13
|
-
function _toPropertyKey(
|
|
14
|
-
function _toPrimitive(
|
|
9
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
15
15
|
var _ = require("lodash"),
|
|
16
16
|
pluralize = require("pluralize");
|
|
17
17
|
function peg$subclass(child, parent) {
|
|
@@ -161,7 +161,6 @@ function peg$parse(input, options) {
|
|
|
161
161
|
fields: addPrimaryKey(body.fields)
|
|
162
162
|
// index: _.union(...body.index)
|
|
163
163
|
};
|
|
164
|
-
|
|
165
164
|
return {
|
|
166
165
|
table: table,
|
|
167
166
|
refs: createRefFromTableWithReference(table, body.references)
|
|
@@ -2294,7 +2293,7 @@ function peg$parse(input, options) {
|
|
|
2294
2293
|
return table.name === referenceTable;
|
|
2295
2294
|
});
|
|
2296
2295
|
if (!toTable) {
|
|
2297
|
-
return
|
|
2296
|
+
return 1; // continue
|
|
2298
2297
|
}
|
|
2299
2298
|
// add field to table if not exists (`${reference}_id`)
|
|
2300
2299
|
// auto add type of new field to be varchar if primaryKey not found
|
|
@@ -2328,8 +2327,7 @@ function peg$parse(input, options) {
|
|
|
2328
2327
|
});
|
|
2329
2328
|
};
|
|
2330
2329
|
for (var i = 0; i < references.length; i += 1) {
|
|
2331
|
-
|
|
2332
|
-
if (_ret === "continue") continue;
|
|
2330
|
+
if (_loop()) continue;
|
|
2333
2331
|
}
|
|
2334
2332
|
return refs;
|
|
2335
2333
|
}
|
package/lib/utils/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dbml/core",
|
|
3
|
-
"version": "3.13.
|
|
3
|
+
"version": "3.13.7-alpha.0",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "Holistics <dev@holistics.io>",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"prepublish": "npm run build"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@dbml/parse": "^3.13.
|
|
35
|
+
"@dbml/parse": "^3.13.7-alpha.0",
|
|
36
36
|
"antlr4": "^4.13.1",
|
|
37
37
|
"lodash": "^4.17.15",
|
|
38
38
|
"parsimmon": "^1.13.0",
|
|
@@ -57,9 +57,12 @@
|
|
|
57
57
|
"transform": {
|
|
58
58
|
"^.+\\.js$": "babel-jest",
|
|
59
59
|
"\\.(?!json$)[^.]*$": "@glen/jest-raw-loader"
|
|
60
|
+
},
|
|
61
|
+
"moduleNameMapper": {
|
|
62
|
+
"^lodash-es$": "lodash"
|
|
60
63
|
}
|
|
61
64
|
},
|
|
62
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "b75ba3ddb06e870cf797392398c6037c03904284",
|
|
63
66
|
"engines": {
|
|
64
67
|
"node": ">=16"
|
|
65
68
|
}
|