@dbml/core 3.13.5 → 3.13.6

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 (162) hide show
  1. package/LICENSE +0 -0
  2. package/README.md +0 -0
  3. package/lib/export/DbmlExporter.js +8 -10
  4. package/lib/export/JsonExporter.js +8 -10
  5. package/lib/export/ModelExporter.js +9 -11
  6. package/lib/export/MysqlExporter.js +14 -16
  7. package/lib/export/OracleExporter.js +17 -19
  8. package/lib/export/PostgresExporter.js +16 -18
  9. package/lib/export/README.md +0 -0
  10. package/lib/export/SqlServerExporter.js +14 -16
  11. package/lib/export/index.js +3 -4
  12. package/lib/export/utils.js +4 -0
  13. package/lib/import/index.js +3 -4
  14. package/lib/index.js +1 -1
  15. package/lib/model_structure/config.js +6 -12
  16. package/lib/model_structure/database.js +22 -26
  17. package/lib/model_structure/dbState.js +9 -11
  18. package/lib/model_structure/element.js +22 -25
  19. package/lib/model_structure/endpoint.js +26 -29
  20. package/lib/model_structure/enum.js +21 -24
  21. package/lib/model_structure/enumValue.js +21 -24
  22. package/lib/model_structure/field.js +21 -24
  23. package/lib/model_structure/indexColumn.js +21 -24
  24. package/lib/model_structure/indexes.js +21 -24
  25. package/lib/model_structure/ref.js +21 -24
  26. package/lib/model_structure/schema.js +21 -24
  27. package/lib/model_structure/stickyNote.js +21 -24
  28. package/lib/model_structure/table.js +26 -29
  29. package/lib/model_structure/tableGroup.js +21 -24
  30. package/lib/model_structure/tablePartial.js +21 -24
  31. package/lib/model_structure/utils.js +0 -0
  32. package/lib/parse/ANTLR/ASTGeneration/AST.js +21 -35
  33. package/lib/parse/ANTLR/ASTGeneration/ParserErrorListener.js +19 -22
  34. package/lib/parse/ANTLR/ASTGeneration/SyntaxError.js +21 -23
  35. package/lib/parse/ANTLR/ASTGeneration/constants.js +5 -9
  36. package/lib/parse/ANTLR/ASTGeneration/helpers.js +0 -0
  37. package/lib/parse/ANTLR/ASTGeneration/index.js +1 -1
  38. package/lib/parse/ANTLR/ASTGeneration/mssql/MssqlASTGen.js +55 -58
  39. package/lib/parse/ANTLR/ASTGeneration/mysql/MySQLASTGen.js +54 -58
  40. package/lib/parse/ANTLR/ASTGeneration/postgres/PostgreSQLLexerBase.js +17 -19
  41. package/lib/parse/ANTLR/ASTGeneration/postgres/PostgreSQLParserBase.js +17 -19
  42. package/lib/parse/ANTLR/ASTGeneration/postgres/PostgresASTGen.js +38 -42
  43. package/lib/parse/ANTLR/ASTGeneration/snowflake/SnowflakeASTGen.js +28 -31
  44. package/lib/parse/ANTLR/README.md +0 -0
  45. package/lib/parse/ANTLR/parsers/mssql/TSqlLexer.g4 +0 -0
  46. package/lib/parse/ANTLR/parsers/mssql/TSqlLexer.interp +0 -0
  47. package/lib/parse/ANTLR/parsers/mssql/TSqlLexer.js +19 -21
  48. package/lib/parse/ANTLR/parsers/mssql/TSqlLexer.tokens +0 -0
  49. package/lib/parse/ANTLR/parsers/mssql/TSqlParser.g4 +0 -0
  50. package/lib/parse/ANTLR/parsers/mssql/TSqlParser.interp +0 -0
  51. package/lib/parse/ANTLR/parsers/mssql/TSqlParser.js +2 -2
  52. package/lib/parse/ANTLR/parsers/mssql/TSqlParser.tokens +0 -0
  53. package/lib/parse/ANTLR/parsers/mssql/TSqlParserVisitor.js +19 -22
  54. package/lib/parse/ANTLR/parsers/mysql/MySqlLexer.g4 +0 -0
  55. package/lib/parse/ANTLR/parsers/mysql/MySqlLexer.interp +0 -0
  56. package/lib/parse/ANTLR/parsers/mysql/MySqlLexer.js +19 -21
  57. package/lib/parse/ANTLR/parsers/mysql/MySqlLexer.tokens +0 -0
  58. package/lib/parse/ANTLR/parsers/mysql/MySqlParser.g4 +0 -0
  59. package/lib/parse/ANTLR/parsers/mysql/MySqlParser.interp +0 -0
  60. package/lib/parse/ANTLR/parsers/mysql/MySqlParser.js +2 -2
  61. package/lib/parse/ANTLR/parsers/mysql/MySqlParser.tokens +0 -0
  62. package/lib/parse/ANTLR/parsers/mysql/MySqlParserVisitor.js +19 -22
  63. package/lib/parse/ANTLR/parsers/postgresql/PostgreSQLLexer.g4 +0 -0
  64. package/lib/parse/ANTLR/parsers/postgresql/PostgreSQLLexer.interp +0 -0
  65. package/lib/parse/ANTLR/parsers/postgresql/PostgreSQLLexer.js +20 -23
  66. package/lib/parse/ANTLR/parsers/postgresql/PostgreSQLLexer.tokens +0 -0
  67. package/lib/parse/ANTLR/parsers/postgresql/PostgreSQLParser.g4 +0 -0
  68. package/lib/parse/ANTLR/parsers/postgresql/PostgreSQLParser.interp +0 -0
  69. package/lib/parse/ANTLR/parsers/postgresql/PostgreSQLParser.js +2 -2
  70. package/lib/parse/ANTLR/parsers/postgresql/PostgreSQLParser.tokens +0 -0
  71. package/lib/parse/ANTLR/parsers/postgresql/PostgreSQLParserVisitor.js +19 -22
  72. package/lib/parse/ANTLR/parsers/postgresql/README.md +0 -0
  73. package/lib/parse/ANTLR/parsers/snowflake/SnowflakeLexer.g4 +0 -0
  74. package/lib/parse/ANTLR/parsers/snowflake/SnowflakeLexer.interp +0 -0
  75. package/lib/parse/ANTLR/parsers/snowflake/SnowflakeLexer.js +19 -21
  76. package/lib/parse/ANTLR/parsers/snowflake/SnowflakeLexer.tokens +0 -0
  77. package/lib/parse/ANTLR/parsers/snowflake/SnowflakeParser.g4 +0 -0
  78. package/lib/parse/ANTLR/parsers/snowflake/SnowflakeParser.interp +0 -0
  79. package/lib/parse/ANTLR/parsers/snowflake/SnowflakeParser.js +2 -2
  80. package/lib/parse/ANTLR/parsers/snowflake/SnowflakeParser.tokens +0 -0
  81. package/lib/parse/ANTLR/parsers/snowflake/SnowflakeParserVisitor.js +19 -22
  82. package/lib/parse/Parser.js +9 -11
  83. package/lib/parse/buildParser.js +6 -6
  84. package/lib/parse/databaseGenerator.js +3 -4
  85. package/lib/parse/dbml/parser.pegjs +0 -0
  86. package/lib/parse/dbmlParser.js +11 -11
  87. package/lib/parse/error.js +8 -10
  88. package/lib/parse/mssql/base_parsers.js +0 -0
  89. package/lib/parse/mssql/column_definition/actions.js +0 -0
  90. package/lib/parse/mssql/column_definition/index.js +0 -0
  91. package/lib/parse/mssql/constraint_definition/actions.js +6 -7
  92. package/lib/parse/mssql/constraint_definition/index.js +0 -0
  93. package/lib/parse/mssql/expression.js +0 -0
  94. package/lib/parse/mssql/fk_definition/actions.js +0 -0
  95. package/lib/parse/mssql/fk_definition/index.js +0 -0
  96. package/lib/parse/mssql/index.js +0 -0
  97. package/lib/parse/mssql/index_definition/actions.js +0 -0
  98. package/lib/parse/mssql/index_definition/index.js +0 -0
  99. package/lib/parse/mssql/keyword_parsers.js +0 -0
  100. package/lib/parse/mssql/keyword_utils.js +0 -0
  101. package/lib/parse/mssql/statements/actions.js +0 -0
  102. package/lib/parse/mssql/statements/index.js +0 -0
  103. package/lib/parse/mssql/statements/statement_types/alter_table/actions.js +0 -0
  104. package/lib/parse/mssql/statements/statement_types/alter_table/add/actions.js +0 -0
  105. package/lib/parse/mssql/statements/statement_types/alter_table/add/index.js +0 -0
  106. package/lib/parse/mssql/statements/statement_types/alter_table/index.js +0 -0
  107. package/lib/parse/mssql/statements/statement_types/comments/actions.js +0 -0
  108. package/lib/parse/mssql/statements/statement_types/comments/index.js +5 -5
  109. package/lib/parse/mssql/statements/statement_types/create_index/actions.js +0 -0
  110. package/lib/parse/mssql/statements/statement_types/create_index/index.js +0 -0
  111. package/lib/parse/mssql/statements/statement_types/create_table/actions.js +6 -6
  112. package/lib/parse/mssql/statements/statement_types/create_table/index.js +0 -0
  113. package/lib/parse/mssql/statements/statement_types/index.js +0 -0
  114. package/lib/parse/mssql/utils.js +1 -1
  115. package/lib/parse/mssql/whitespaces.js +0 -0
  116. package/lib/parse/mssqlParser.js +2 -3
  117. package/lib/parse/mysql/parser.pegjs +0 -0
  118. package/lib/parse/mysqlParser.js +11 -11
  119. package/lib/parse/postgresParser.js +1 -1
  120. package/lib/parse/postgresql/Base_rules.pegjs +0 -0
  121. package/lib/parse/postgresql/Commands/Alter_table/Alter_table.pegjs +0 -0
  122. package/lib/parse/postgresql/Commands/Commands.pegjs +0 -0
  123. package/lib/parse/postgresql/Commands/Comment.pegjs +0 -0
  124. package/lib/parse/postgresql/Commands/Create_index.pegjs +0 -0
  125. package/lib/parse/postgresql/Commands/Create_table/Create_table.pegjs +0 -0
  126. package/lib/parse/postgresql/Commands/Create_table/Create_table_normal.pegjs +0 -0
  127. package/lib/parse/postgresql/Commands/Create_table/Create_table_of.pegjs +0 -0
  128. package/lib/parse/postgresql/Commands/Create_table/Create_table_partition_of.pegjs +0 -0
  129. package/lib/parse/postgresql/Commands/Create_type/Create_type.pegjs +0 -0
  130. package/lib/parse/postgresql/Commands/Create_type/Create_type_enum.pegjs +0 -0
  131. package/lib/parse/postgresql/Commands/Create_type/Create_type_range.pegjs +0 -0
  132. package/lib/parse/postgresql/Commands/Ignore_syntax.pegjs +0 -0
  133. package/lib/parse/postgresql/Expression.pegjs +0 -0
  134. package/lib/parse/postgresql/InitializerUtils.pegjs +0 -0
  135. package/lib/parse/postgresql/Keywords.pegjs +0 -0
  136. package/lib/parse/postgresql/get_parser.js +1 -1
  137. package/lib/parse/postgresql/parser.pegjs +0 -0
  138. package/lib/parse/schemarb/parser.pegjs +0 -0
  139. package/lib/parse/schemarbParser.js +8 -10
  140. package/lib/utils/version.js +1 -2
  141. package/package.json +3 -3
  142. package/types/export/ModelExporter.d.ts +0 -0
  143. package/types/export/index.d.ts +0 -0
  144. package/types/import/index.d.ts +0 -0
  145. package/types/index.d.ts +0 -0
  146. package/types/model_structure/database.d.ts +0 -0
  147. package/types/model_structure/dbState.d.ts +0 -0
  148. package/types/model_structure/element.d.ts +0 -0
  149. package/types/model_structure/endpoint.d.ts +0 -0
  150. package/types/model_structure/enum.d.ts +0 -0
  151. package/types/model_structure/enumValue.d.ts +0 -0
  152. package/types/model_structure/field.d.ts +0 -0
  153. package/types/model_structure/indexColumn.d.ts +0 -0
  154. package/types/model_structure/indexes.d.ts +0 -0
  155. package/types/model_structure/ref.d.ts +0 -0
  156. package/types/model_structure/schema.d.ts +0 -0
  157. package/types/model_structure/stickyNote.d.ts +0 -0
  158. package/types/model_structure/table.d.ts +0 -0
  159. package/types/model_structure/tableGroup.d.ts +0 -0
  160. package/types/model_structure/tablePartial.d.ts +0 -0
  161. package/types/parse/Parser.d.ts +0 -0
  162. package/types/parse/error.d.ts +0 -0
@@ -1,35 +1,33 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
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
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports["default"] = void 0;
8
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
9
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
10
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
11
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
12
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
13
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
14
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
15
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
16
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
17
- function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }
18
- function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
19
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
20
- function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }
21
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
22
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
23
- var SyntaxError = /*#__PURE__*/function (_Error) {
24
- _inherits(SyntaxError, _Error);
25
- var _super = _createSuper(SyntaxError);
8
+ 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); } }
9
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
10
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
11
+ 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); }
12
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
13
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
14
+ 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); }
15
+ function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
16
+ 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); }
17
+ function _wrapNativeSuper(t) { var r = "function" == typeof Map ? new Map() : void 0; return _wrapNativeSuper = function _wrapNativeSuper(t) { if (null === t || !_isNativeFunction(t)) return t; if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function"); if (void 0 !== r) { if (r.has(t)) return r.get(t); r.set(t, Wrapper); } function Wrapper() { return _construct(t, arguments, _getPrototypeOf(this).constructor); } return Wrapper.prototype = Object.create(t.prototype, { constructor: { value: Wrapper, enumerable: !1, writable: !0, configurable: !0 } }), _setPrototypeOf(Wrapper, t); }, _wrapNativeSuper(t); }
18
+ function _construct(t, e, r) { if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments); var o = [null]; o.push.apply(o, e); var p = new (t.bind.apply(t, o))(); return r && _setPrototypeOf(p, r.prototype), p; }
19
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
20
+ function _isNativeFunction(t) { try { return -1 !== Function.toString.call(t).indexOf("[native code]"); } catch (n) { return "function" == typeof t; } }
21
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
22
+ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
23
+ var SyntaxError = exports["default"] = /*#__PURE__*/function (_Error) {
26
24
  function SyntaxError(line, column, msg) {
27
25
  var _this;
28
26
  _classCallCheck(this, SyntaxError);
29
- _this = _super.call(this, msg);
27
+ _this = _callSuper(this, SyntaxError, [msg]);
30
28
  // maintain proper stack trace
31
29
  if (Error.captureStackTrace) {
32
- Error.captureStackTrace(_assertThisInitialized(_this), SyntaxError);
30
+ Error.captureStackTrace(_this, SyntaxError);
33
31
  }
34
32
 
35
33
  // These properies names and structures are needed by other app (for example dbdiagram) to display error.
@@ -42,6 +40,6 @@ var SyntaxError = /*#__PURE__*/function (_Error) {
42
40
  };
43
41
  return _this;
44
42
  }
43
+ _inherits(SyntaxError, _Error);
45
44
  return _createClass(SyntaxError);
46
- }( /*#__PURE__*/_wrapNativeSuper(Error));
47
- exports["default"] = SyntaxError;
45
+ }(/*#__PURE__*/_wrapNativeSuper(Error));
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.TABLE_CONSTRAINT_KIND = exports.DATA_TYPE = exports.CONSTRAINT_TYPE = exports.COLUMN_CONSTRAINT_KIND = void 0;
7
- var TABLE_CONSTRAINT_KIND = {
7
+ var TABLE_CONSTRAINT_KIND = exports.TABLE_CONSTRAINT_KIND = {
8
8
  FIELD: 'field',
9
9
  INDEX: 'index',
10
10
  FK: 'fk',
@@ -12,8 +12,7 @@ var TABLE_CONSTRAINT_KIND = {
12
12
  PK: 'pk',
13
13
  DEFAULT: 'default'
14
14
  };
15
- exports.TABLE_CONSTRAINT_KIND = TABLE_CONSTRAINT_KIND;
16
- var COLUMN_CONSTRAINT_KIND = {
15
+ var COLUMN_CONSTRAINT_KIND = exports.COLUMN_CONSTRAINT_KIND = {
17
16
  NOT_NULL: 'not_null',
18
17
  UNIQUE: 'unique',
19
18
  PK: 'pk',
@@ -23,8 +22,7 @@ var COLUMN_CONSTRAINT_KIND = {
23
22
  NOTE: 'note',
24
23
  CHECK: 'check'
25
24
  };
26
- exports.COLUMN_CONSTRAINT_KIND = COLUMN_CONSTRAINT_KIND;
27
- var DATA_TYPE = {
25
+ var DATA_TYPE = exports.DATA_TYPE = {
28
26
  STRING: 'string',
29
27
  NUMBER: 'number',
30
28
  BOOLEAN: 'boolean',
@@ -32,10 +30,8 @@ var DATA_TYPE = {
32
30
  };
33
31
 
34
32
  // legacy - for compatibility with model_structure
35
- exports.DATA_TYPE = DATA_TYPE;
36
- var CONSTRAINT_TYPE = {
33
+ var CONSTRAINT_TYPE = exports.CONSTRAINT_TYPE = {
37
34
  COLUMN: 'column',
38
35
  STRING: 'string',
39
36
  EXPRESSION: 'expression'
40
- };
41
- exports.CONSTRAINT_TYPE = CONSTRAINT_TYPE;
37
+ };
File without changes
@@ -18,7 +18,7 @@ var _ParserErrorListener = _interopRequireDefault(require("./ParserErrorListener
18
18
  var _TSqlLexer = _interopRequireDefault(require("../parsers/mssql/TSqlLexer"));
19
19
  var _TSqlParser = _interopRequireDefault(require("../parsers/mssql/TSqlParser"));
20
20
  var _MssqlASTGen = _interopRequireDefault(require("./mssql/MssqlASTGen"));
21
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
21
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
22
22
  /* eslint-disable import/no-named-as-default-member */
23
23
  /* eslint-disable import/no-named-as-default */
24
24
 
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
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
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
@@ -10,29 +10,29 @@ var _TSqlParserVisitor2 = _interopRequireDefault(require("../../parsers/mssql/TS
10
10
  var _constants = require("../constants");
11
11
  var _helpers = require("../helpers");
12
12
  var _AST = require("../AST");
13
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
14
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
15
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
16
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
17
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
18
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
19
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
20
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
21
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
22
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
23
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
24
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
25
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
26
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
14
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
15
+ 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); } }
16
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
17
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
18
+ 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); }
19
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
20
+ 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); }
21
+ function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
22
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
23
+ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
24
+ 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); }
25
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
26
+ function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
27
27
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
28
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
29
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
30
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
28
+ function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
29
+ function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
30
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
31
31
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
32
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
33
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
34
- function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
35
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } /* eslint-disable class-methods-use-this */
32
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
33
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
34
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
35
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } /* eslint-disable class-methods-use-this */
36
36
  var ADD_DESCRIPTION_FUNCTION_NAME = 'sp_addextendedproperty';
37
37
  var CHECK_CONSTRAINT_CONDITION_TYPE = {
38
38
  RAW: 'raw',
@@ -126,13 +126,11 @@ var parseFieldsAndInlineRefsFromFieldsData = function parseFieldsAndInlineRefsFr
126
126
  checkConstraints: checkConstraints
127
127
  };
128
128
  };
129
- var MssqlASTGen = /*#__PURE__*/function (_TSqlParserVisitor) {
130
- _inherits(MssqlASTGen, _TSqlParserVisitor);
131
- var _super = _createSuper(MssqlASTGen);
129
+ var MssqlASTGen = exports["default"] = /*#__PURE__*/function (_TSqlParserVisitor) {
132
130
  function MssqlASTGen() {
133
131
  var _this;
134
132
  _classCallCheck(this, MssqlASTGen);
135
- _this = _super.call(this);
133
+ _this = _callSuper(this, MssqlASTGen);
136
134
  _this.data = {
137
135
  schemas: [],
138
136
  tables: [],
@@ -150,7 +148,8 @@ var MssqlASTGen = /*#__PURE__*/function (_TSqlParserVisitor) {
150
148
  // : batch* EOF
151
149
  // | execute_body_batch go_statement* EOF
152
150
  // ;
153
- _createClass(MssqlASTGen, [{
151
+ _inherits(MssqlASTGen, _TSqlParserVisitor);
152
+ return _createClass(MssqlASTGen, [{
154
153
  key: "visitTsql_file",
155
154
  value: function visitTsql_file(ctx) {
156
155
  var _this2 = this;
@@ -663,9 +662,9 @@ var MssqlASTGen = /*#__PURE__*/function (_TSqlParserVisitor) {
663
662
  }, {
664
663
  key: "visitColumn_def_table_constraints",
665
664
  value: function visitColumn_def_table_constraints(ctx) {
666
- var _this10 = this;
665
+ var _this0 = this;
667
666
  return ctx.column_def_table_constraint().map(function (columnDef) {
668
- return columnDef.accept(_this10);
667
+ return columnDef.accept(_this0);
669
668
  }).filter(function (columnDef) {
670
669
  return columnDef;
671
670
  });
@@ -694,7 +693,7 @@ var MssqlASTGen = /*#__PURE__*/function (_TSqlParserVisitor) {
694
693
  }, {
695
694
  key: "visitColumn_definition",
696
695
  value: function visitColumn_definition(ctx) {
697
- var _this11 = this;
696
+ var _this1 = this;
698
697
  var columnName = ctx.id_().accept(this);
699
698
  var type = '';
700
699
  if (ctx.data_type()) {
@@ -722,7 +721,7 @@ var MssqlASTGen = /*#__PURE__*/function (_TSqlParserVisitor) {
722
721
  }
723
722
  };
724
723
  var columnDefinitions = ctx.column_definition_element().map(function (columnDef) {
725
- return columnDef.accept(_this11);
724
+ return columnDef.accept(_this1);
726
725
  });
727
726
 
728
727
  // e.g.
@@ -932,11 +931,11 @@ var MssqlASTGen = /*#__PURE__*/function (_TSqlParserVisitor) {
932
931
  }, {
933
932
  key: "visitPredicate",
934
933
  value: function visitPredicate(ctx) {
935
- var _this12 = this;
934
+ var _this10 = this;
936
935
  if (ctx.IN() && ctx.expression_list_() && ctx.NOT().length === 0) {
937
936
  var _expression$value;
938
937
  var _ctx$expression$map = ctx.expression().map(function (e) {
939
- return e.accept(_this12);
938
+ return e.accept(_this10);
940
939
  }),
941
940
  _ctx$expression$map2 = _slicedToArray(_ctx$expression$map, 1),
942
941
  _ctx$expression$map2$ = _ctx$expression$map2[0],
@@ -971,17 +970,17 @@ var MssqlASTGen = /*#__PURE__*/function (_TSqlParserVisitor) {
971
970
  }, {
972
971
  key: "visitForeign_key_options",
973
972
  value: function visitForeign_key_options(ctx) {
974
- var _this13 = this;
973
+ var _this11 = this;
975
974
  var names = ctx.table_name().accept(this);
976
975
  var _getSchemaAndTableNam2 = getSchemaAndTableName(names),
977
976
  refSchemaName = _getSchemaAndTableNam2.schemaName,
978
977
  refTableName = _getSchemaAndTableNam2.tableName;
979
978
  var fieldNames = ctx.column_name_list().accept(this);
980
979
  var onDelete = ctx.on_delete() ? ctx.on_delete().map(function (action) {
981
- return action.accept(_this13);
980
+ return action.accept(_this11);
982
981
  })[0] : null;
983
982
  var onUpdate = ctx.on_update() ? ctx.on_update().map(function (action) {
984
- return action.accept(_this13);
983
+ return action.accept(_this11);
985
984
  })[0] : null;
986
985
  return {
987
986
  refTableName: refTableName,
@@ -998,9 +997,9 @@ var MssqlASTGen = /*#__PURE__*/function (_TSqlParserVisitor) {
998
997
  }, {
999
998
  key: "visitColumn_name_list",
1000
999
  value: function visitColumn_name_list(ctx) {
1001
- var _this14 = this;
1000
+ var _this12 = this;
1002
1001
  return ctx.id_().map(function (id) {
1003
- return id.accept(_this14);
1002
+ return id.accept(_this12);
1004
1003
  });
1005
1004
  }
1006
1005
 
@@ -1052,9 +1051,9 @@ var MssqlASTGen = /*#__PURE__*/function (_TSqlParserVisitor) {
1052
1051
  }, {
1053
1052
  key: "visitTable_constraint",
1054
1053
  value: function visitTable_constraint(ctx) {
1055
- var _this15 = this;
1054
+ var _this13 = this;
1056
1055
  var name = ctx.id_() ? ctx.id_().map(function (id) {
1057
- return id.accept(_this15);
1056
+ return id.accept(_this13);
1058
1057
  })[0] : '';
1059
1058
  if (ctx.PRIMARY() || ctx.UNIQUE()) {
1060
1059
  var columns = ctx.column_name_list_with_order().accept(this);
@@ -1129,10 +1128,10 @@ var MssqlASTGen = /*#__PURE__*/function (_TSqlParserVisitor) {
1129
1128
  }, {
1130
1129
  key: "visitColumn_name_list_with_order",
1131
1130
  value: function visitColumn_name_list_with_order(ctx) {
1132
- var _this16 = this;
1131
+ var _this14 = this;
1133
1132
  return ctx.id_().map(function (id) {
1134
1133
  return {
1135
- value: id.accept(_this16),
1134
+ value: id.accept(_this14),
1136
1135
  type: 'column'
1137
1136
  };
1138
1137
  });
@@ -1148,10 +1147,10 @@ var MssqlASTGen = /*#__PURE__*/function (_TSqlParserVisitor) {
1148
1147
  }, {
1149
1148
  key: "visitTable_indices",
1150
1149
  value: function visitTable_indices(ctx) {
1151
- var _this17 = this;
1150
+ var _this15 = this;
1152
1151
  var index = new _AST.Index({
1153
1152
  name: ctx.id_().map(function (id) {
1154
- return id.accept(_this17);
1153
+ return id.accept(_this15);
1155
1154
  })[0],
1156
1155
  unique: !!ctx.UNIQUE(),
1157
1156
  columns: ctx.column_name_list_with_order().accept(this)
@@ -1185,7 +1184,7 @@ var MssqlASTGen = /*#__PURE__*/function (_TSqlParserVisitor) {
1185
1184
  _this$data$refs4,
1186
1185
  _table$fields,
1187
1186
  _table$indexes,
1188
- _this18 = this;
1187
+ _this16 = this;
1189
1188
  // table_name() returns an array because there are multiple table_name in the clause (REFERENCES table_name ...)
1190
1189
  var names = ctx.table_name()[0].accept(this);
1191
1190
  var _getSchemaAndTableNam3 = getSchemaAndTableName(names),
@@ -1235,7 +1234,7 @@ var MssqlASTGen = /*#__PURE__*/function (_TSqlParserVisitor) {
1235
1234
  }),
1236
1235
  schemaName: schemaName
1237
1236
  });
1238
- _this18.data.enums.push(enumObject);
1237
+ _this16.data.enums.push(enumObject);
1239
1238
  // TODO: handle multiple enums for the same field
1240
1239
  field.type.type_name = enumObject.name;
1241
1240
  field.type.schemaName = enumObject.schemaName;
@@ -1382,12 +1381,12 @@ var MssqlASTGen = /*#__PURE__*/function (_TSqlParserVisitor) {
1382
1381
  }, {
1383
1382
  key: "visitFunc_proc_name_server_database_schema",
1384
1383
  value: function visitFunc_proc_name_server_database_schema(ctx) {
1385
- var _this19 = this;
1384
+ var _this17 = this;
1386
1385
  if (ctx.func_proc_name_database_schema()) {
1387
1386
  return ctx.func_proc_name_database_schema().accept(this);
1388
1387
  }
1389
1388
  return ctx.id_().map(function (id) {
1390
- return id.accept(_this19);
1389
+ return id.accept(_this17);
1391
1390
  });
1392
1391
  }
1393
1392
 
@@ -1398,12 +1397,12 @@ var MssqlASTGen = /*#__PURE__*/function (_TSqlParserVisitor) {
1398
1397
  }, {
1399
1398
  key: "visitFunc_proc_name_database_schema",
1400
1399
  value: function visitFunc_proc_name_database_schema(ctx) {
1401
- var _this20 = this;
1400
+ var _this18 = this;
1402
1401
  if (ctx.func_proc_name_schema()) {
1403
1402
  return ctx.func_proc_name_schema().accept(this);
1404
1403
  }
1405
1404
  return ctx.id_().map(function (id) {
1406
- return id.accept(_this20);
1405
+ return id.accept(_this18);
1407
1406
  });
1408
1407
  }
1409
1408
 
@@ -1413,9 +1412,9 @@ var MssqlASTGen = /*#__PURE__*/function (_TSqlParserVisitor) {
1413
1412
  }, {
1414
1413
  key: "visitFunc_proc_name_schema",
1415
1414
  value: function visitFunc_proc_name_schema(ctx) {
1416
- var _this21 = this;
1415
+ var _this19 = this;
1417
1416
  return ctx.id_().map(function (id) {
1418
- return id.accept(_this21);
1417
+ return id.accept(_this19);
1419
1418
  });
1420
1419
  }
1421
1420
 
@@ -1426,14 +1425,14 @@ var MssqlASTGen = /*#__PURE__*/function (_TSqlParserVisitor) {
1426
1425
  }, {
1427
1426
  key: "visitExecute_statement_arg",
1428
1427
  value: function visitExecute_statement_arg(ctx) {
1429
- var _this22 = this;
1428
+ var _this20 = this;
1430
1429
  if (ctx.execute_statement_arg_unnamed()) {
1431
1430
  return ctx.execute_statement_arg_unnamed().map(function (item) {
1432
- return item.accept(_this22);
1431
+ return item.accept(_this20);
1433
1432
  });
1434
1433
  }
1435
1434
  return ctx.execute_statement_arg_named().map(function (item) {
1436
- return item.accept(_this22);
1435
+ return item.accept(_this20);
1437
1436
  });
1438
1437
  }
1439
1438
 
@@ -1501,6 +1500,4 @@ var MssqlASTGen = /*#__PURE__*/function (_TSqlParserVisitor) {
1501
1500
  };
1502
1501
  }
1503
1502
  }]);
1504
- return MssqlASTGen;
1505
- }(_TSqlParserVisitor2["default"]);
1506
- exports["default"] = MssqlASTGen;
1503
+ }(_TSqlParserVisitor2["default"]);