@dbml/core 5.0.0 → 5.2.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.
Files changed (53) hide show
  1. package/lib/export/DbmlExporter.js +3 -2
  2. package/lib/export/MysqlExporter.js +2 -2
  3. package/lib/export/OracleExporter.js +2 -2
  4. package/lib/export/PostgresExporter.js +2 -2
  5. package/lib/export/SqlServerExporter.js +2 -2
  6. package/lib/model_structure/element.js +1 -3
  7. package/lib/parse/ANTLR/ASTGeneration/AST.js +0 -2
  8. package/lib/parse/ANTLR/ASTGeneration/constants.js +1 -0
  9. package/lib/parse/ANTLR/ASTGeneration/index.js +16 -3
  10. package/lib/parse/ANTLR/ASTGeneration/mssql/MssqlASTGen.js +1 -1
  11. package/lib/parse/ANTLR/ASTGeneration/mssql/README.md +157 -0
  12. package/lib/parse/ANTLR/ASTGeneration/mysql/MySQLASTGen.js +1 -1
  13. package/lib/parse/ANTLR/ASTGeneration/mysql/README.md +157 -0
  14. package/lib/parse/ANTLR/ASTGeneration/oraclesql/OracleSQLASTGen.js +1154 -0
  15. package/lib/parse/ANTLR/ASTGeneration/oraclesql/README.md +157 -0
  16. package/lib/parse/ANTLR/ASTGeneration/postgres/PostgresASTGen.js +2 -3
  17. package/lib/parse/ANTLR/ASTGeneration/postgres/README.md +157 -0
  18. package/lib/parse/ANTLR/ASTGeneration/snowflake/README.md +157 -0
  19. package/lib/parse/ANTLR/ASTGeneration/snowflake/SnowflakeASTGen.js +1 -1
  20. package/lib/parse/ANTLR/parsers/mysql/MySqlLexer.g4 +60 -2
  21. package/lib/parse/ANTLR/parsers/mysql/MySqlLexer.interp +25 -4
  22. package/lib/parse/ANTLR/parsers/mysql/MySqlLexer.js +1235 -1171
  23. package/lib/parse/ANTLR/parsers/mysql/MySqlLexer.tokens +2306 -2300
  24. package/lib/parse/ANTLR/parsers/mysql/MySqlLexerBase.js +52 -0
  25. package/lib/parse/ANTLR/parsers/mysql/MySqlParser.g4 +6 -4
  26. package/lib/parse/ANTLR/parsers/mysql/MySqlParser.interp +15 -3
  27. package/lib/parse/ANTLR/parsers/mysql/MySqlParser.js +2 -2
  28. package/lib/parse/ANTLR/parsers/mysql/MySqlParser.tokens +2306 -2300
  29. package/lib/parse/ANTLR/parsers/mysql/MySqlParserVisitor.js +1 -1
  30. package/lib/parse/ANTLR/parsers/oraclesql/OracleSqlLexer.g4 +2623 -0
  31. package/lib/parse/ANTLR/parsers/oraclesql/OracleSqlLexer.interp +7475 -0
  32. package/lib/parse/ANTLR/parsers/oraclesql/OracleSqlLexer.js +3 -0
  33. package/lib/parse/ANTLR/parsers/oraclesql/OracleSqlLexer.tokens +4934 -0
  34. package/lib/parse/ANTLR/parsers/oraclesql/OracleSqlLexerBase.js +35 -0
  35. package/lib/parse/ANTLR/parsers/oraclesql/OracleSqlParser.g4 +9988 -0
  36. package/lib/parse/ANTLR/parsers/oraclesql/OracleSqlParser.interp +6174 -0
  37. package/lib/parse/ANTLR/parsers/oraclesql/OracleSqlParser.js +3 -0
  38. package/lib/parse/ANTLR/parsers/oraclesql/OracleSqlParser.tokens +4934 -0
  39. package/lib/parse/ANTLR/parsers/oraclesql/OracleSqlParserBase.js +64 -0
  40. package/lib/parse/ANTLR/parsers/oraclesql/OracleSqlParserVisitor.js +8466 -0
  41. package/lib/parse/Parser.js +8 -0
  42. package/lib/parse/buildParser.js +1 -1
  43. package/lib/parse/databaseGenerator.js +10 -7
  44. package/lib/parse/error.js +0 -1
  45. package/lib/parse/mssql/fk_definition/actions.js +1 -1
  46. package/lib/parse/mssql/index.js +0 -1
  47. package/lib/parse/mssql/statements/statement_types/alter_table/actions.js +0 -1
  48. package/lib/parse/mssql/statements/statement_types/alter_table/add/actions.js +0 -2
  49. package/lib/parse/mssql/statements/statement_types/comments/index.js +2 -2
  50. package/lib/parse/mssql/utils.js +0 -1
  51. package/package.json +16 -5
  52. package/types/import/index.d.ts +1 -1
  53. package/types/parse/Parser.d.ts +3 -1
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+
3
+ 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); }
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports["default"] = void 0;
8
+ var _antlr = _interopRequireDefault(require("antlr4"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
11
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
12
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), 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
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
16
+ function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
17
+ function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
18
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
19
+ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
20
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
21
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
22
+ var OracleSqlLexerBase = exports["default"] = /*#__PURE__*/function (_antlr4$Lexer) {
23
+ function OracleSqlLexerBase() {
24
+ _classCallCheck(this, OracleSqlLexerBase);
25
+ return _callSuper(this, OracleSqlLexerBase, arguments);
26
+ }
27
+ _inherits(OracleSqlLexerBase, _antlr4$Lexer);
28
+ return _createClass(OracleSqlLexerBase, [{
29
+ key: "IsNewlineAtPos",
30
+ value: function IsNewlineAtPos(pos) {
31
+ var la = this._input.LA(pos);
32
+ return la === -1 || String.fromCharCode(la) === '\n';
33
+ }
34
+ }]);
35
+ }(_antlr["default"].Lexer);