dt-sql-parser 4.0.1 → 4.1.0-beta.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 (88) hide show
  1. package/README.md +6 -1
  2. package/dist/lib/flink/FlinkSqlLexer.js +1 -2
  3. package/dist/lib/flink/FlinkSqlParser.d.ts +175 -174
  4. package/dist/lib/flink/FlinkSqlParser.js +2315 -2388
  5. package/dist/lib/flink/FlinkSqlParserListener.d.ts +5 -16
  6. package/dist/lib/flink/FlinkSqlParserVisitor.d.ts +3 -10
  7. package/dist/lib/hive/HiveSqlLexer.js +1 -2
  8. package/dist/lib/hive/HiveSqlParser.d.ts +3 -1
  9. package/dist/lib/hive/HiveSqlParser.js +8 -9
  10. package/dist/lib/impala/ImpalaSqlLexer.js +1 -2
  11. package/dist/lib/impala/ImpalaSqlParser.d.ts +123 -107
  12. package/dist/lib/impala/ImpalaSqlParser.js +3223 -3155
  13. package/dist/lib/impala/ImpalaSqlParserListener.d.ts +22 -0
  14. package/dist/lib/impala/ImpalaSqlParserVisitor.d.ts +14 -0
  15. package/dist/lib/mysql/MySqlLexer.js +1 -2
  16. package/dist/lib/mysql/MySqlParser.d.ts +469 -422
  17. package/dist/lib/mysql/MySqlParser.js +11463 -10512
  18. package/dist/lib/mysql/MySqlParserListener.d.ts +42 -20
  19. package/dist/lib/mysql/MySqlParserVisitor.d.ts +26 -12
  20. package/dist/lib/postgresql/PostgreSqlLexer.js +1 -2
  21. package/dist/lib/postgresql/PostgreSqlParser.d.ts +2025 -6265
  22. package/dist/lib/postgresql/PostgreSqlParser.js +60092 -88368
  23. package/dist/lib/postgresql/PostgreSqlParserListener.d.ts +1688 -6083
  24. package/dist/lib/postgresql/PostgreSqlParserVisitor.d.ts +712 -3511
  25. package/dist/lib/spark/SparkSqlLexer.js +1 -2
  26. package/dist/lib/spark/SparkSqlParser.d.ts +16 -13
  27. package/dist/lib/spark/SparkSqlParser.js +50 -51
  28. package/dist/lib/spark/SparkSqlParserListener.d.ts +10 -10
  29. package/dist/lib/spark/SparkSqlParserVisitor.d.ts +6 -6
  30. package/dist/lib/trino/TrinoSqlLexer.d.ts +323 -260
  31. package/dist/lib/trino/TrinoSqlLexer.js +1610 -1264
  32. package/dist/lib/trino/TrinoSqlListener.d.ts +1311 -200
  33. package/dist/lib/trino/TrinoSqlParser.d.ts +1908 -562
  34. package/dist/lib/trino/TrinoSqlParser.js +22629 -13412
  35. package/dist/lib/trino/TrinoSqlVisitor.d.ts +761 -69
  36. package/dist/locale/locale.d.ts +41 -0
  37. package/dist/locale/locale.js +43 -0
  38. package/dist/parser/common/basicSQL.d.ts +7 -2
  39. package/dist/parser/common/basicSQL.js +5 -15
  40. package/dist/parser/common/entityCollector.d.ts +60 -12
  41. package/dist/parser/common/entityCollector.js +141 -17
  42. package/dist/parser/common/parseErrorListener.d.ts +6 -3
  43. package/dist/parser/common/parseErrorListener.js +83 -2
  44. package/dist/parser/common/textAndWord.d.ts +6 -9
  45. package/dist/parser/common/textAndWord.js +9 -20
  46. package/dist/parser/common/transform.d.ts +8 -0
  47. package/dist/parser/common/transform.js +11 -0
  48. package/dist/parser/common/types.d.ts +1 -0
  49. package/dist/parser/flink/flinkEntityCollector.js +40 -6
  50. package/dist/parser/flink/flinkErrorListener.d.ts +9 -0
  51. package/dist/parser/flink/flinkErrorListener.js +67 -0
  52. package/dist/parser/flink/index.d.ts +3 -0
  53. package/dist/parser/flink/index.js +13 -9
  54. package/dist/parser/hive/hiveEntityCollector.js +40 -6
  55. package/dist/parser/hive/hiveErrorListener.d.ts +9 -0
  56. package/dist/parser/hive/hiveErrorListener.js +65 -0
  57. package/dist/parser/hive/index.d.ts +3 -0
  58. package/dist/parser/hive/index.js +13 -9
  59. package/dist/parser/impala/ImpalaErrorListener.d.ts +9 -0
  60. package/dist/parser/impala/ImpalaErrorListener.js +63 -0
  61. package/dist/parser/impala/impalaEntityCollector.js +51 -6
  62. package/dist/parser/impala/index.d.ts +3 -0
  63. package/dist/parser/impala/index.js +4 -0
  64. package/dist/parser/mysql/index.d.ts +3 -0
  65. package/dist/parser/mysql/index.js +4 -0
  66. package/dist/parser/mysql/mysqlEntityCollector.d.ts +3 -1
  67. package/dist/parser/mysql/mysqlEntityCollector.js +40 -5
  68. package/dist/parser/mysql/mysqlErrorListener.d.ts +9 -0
  69. package/dist/parser/mysql/mysqlErrorListener.js +63 -0
  70. package/dist/parser/postgresql/index.d.ts +3 -0
  71. package/dist/parser/postgresql/index.js +17 -13
  72. package/dist/parser/postgresql/postgreEntityCollector.d.ts +5 -1
  73. package/dist/parser/postgresql/postgreEntityCollector.js +44 -4
  74. package/dist/parser/postgresql/postgreErrorListener.d.ts +9 -0
  75. package/dist/parser/postgresql/postgreErrorListener.js +71 -0
  76. package/dist/parser/spark/index.d.ts +3 -0
  77. package/dist/parser/spark/index.js +4 -0
  78. package/dist/parser/spark/sparkEntityCollector.d.ts +1 -1
  79. package/dist/parser/spark/sparkEntityCollector.js +43 -6
  80. package/dist/parser/spark/sparkErrorListener.d.ts +9 -0
  81. package/dist/parser/spark/sparkErrorListener.js +63 -0
  82. package/dist/parser/trino/index.d.ts +3 -0
  83. package/dist/parser/trino/index.js +23 -10
  84. package/dist/parser/trino/trinoEntityCollector.d.ts +6 -4
  85. package/dist/parser/trino/trinoEntityCollector.js +44 -9
  86. package/dist/parser/trino/trinoErrorListener.d.ts +9 -0
  87. package/dist/parser/trino/trinoErrorListener.js +65 -0
  88. package/package.json +40 -12
@@ -101,6 +101,7 @@ import { CreateCommonItemContext } from "./ImpalaSqlParser.js";
101
101
  import { AssignmentListContext } from "./ImpalaSqlParser.js";
102
102
  import { AssignmentItemContext } from "./ImpalaSqlParser.js";
103
103
  import { ViewColumnsContext } from "./ImpalaSqlParser.js";
104
+ import { ViewColumnItemContext } from "./ImpalaSqlParser.js";
104
105
  import { QueryStatementContext } from "./ImpalaSqlParser.js";
105
106
  import { WithContext } from "./ImpalaSqlParser.js";
106
107
  import { ConstraintSpecificationContext } from "./ImpalaSqlParser.js";
@@ -109,6 +110,7 @@ import { ColumnSpecContext } from "./ImpalaSqlParser.js";
109
110
  import { ColumnDefinitionContext } from "./ImpalaSqlParser.js";
110
111
  import { KuduTableElementContext } from "./ImpalaSqlParser.js";
111
112
  import { KuduColumnDefinitionContext } from "./ImpalaSqlParser.js";
113
+ import { CommentClauseContext } from "./ImpalaSqlParser.js";
112
114
  import { ColumnSpecWithKuduContext } from "./ImpalaSqlParser.js";
113
115
  import { CreateColumnSpecWithKuduContext } from "./ImpalaSqlParser.js";
114
116
  import { KuduAttributesContext } from "./ImpalaSqlParser.js";
@@ -1265,6 +1267,16 @@ export declare class ImpalaSqlParserListener implements ParseTreeListener {
1265
1267
  * @param ctx the parse tree
1266
1268
  */
1267
1269
  exitViewColumns?: (ctx: ViewColumnsContext) => void;
1270
+ /**
1271
+ * Enter a parse tree produced by `ImpalaSqlParser.viewColumnItem`.
1272
+ * @param ctx the parse tree
1273
+ */
1274
+ enterViewColumnItem?: (ctx: ViewColumnItemContext) => void;
1275
+ /**
1276
+ * Exit a parse tree produced by `ImpalaSqlParser.viewColumnItem`.
1277
+ * @param ctx the parse tree
1278
+ */
1279
+ exitViewColumnItem?: (ctx: ViewColumnItemContext) => void;
1268
1280
  /**
1269
1281
  * Enter a parse tree produced by `ImpalaSqlParser.queryStatement`.
1270
1282
  * @param ctx the parse tree
@@ -1345,6 +1357,16 @@ export declare class ImpalaSqlParserListener implements ParseTreeListener {
1345
1357
  * @param ctx the parse tree
1346
1358
  */
1347
1359
  exitKuduColumnDefinition?: (ctx: KuduColumnDefinitionContext) => void;
1360
+ /**
1361
+ * Enter a parse tree produced by `ImpalaSqlParser.commentClause`.
1362
+ * @param ctx the parse tree
1363
+ */
1364
+ enterCommentClause?: (ctx: CommentClauseContext) => void;
1365
+ /**
1366
+ * Exit a parse tree produced by `ImpalaSqlParser.commentClause`.
1367
+ * @param ctx the parse tree
1368
+ */
1369
+ exitCommentClause?: (ctx: CommentClauseContext) => void;
1348
1370
  /**
1349
1371
  * Enter a parse tree produced by `ImpalaSqlParser.columnSpecWithKudu`.
1350
1372
  * @param ctx the parse tree
@@ -101,6 +101,7 @@ import { CreateCommonItemContext } from "./ImpalaSqlParser.js";
101
101
  import { AssignmentListContext } from "./ImpalaSqlParser.js";
102
102
  import { AssignmentItemContext } from "./ImpalaSqlParser.js";
103
103
  import { ViewColumnsContext } from "./ImpalaSqlParser.js";
104
+ import { ViewColumnItemContext } from "./ImpalaSqlParser.js";
104
105
  import { QueryStatementContext } from "./ImpalaSqlParser.js";
105
106
  import { WithContext } from "./ImpalaSqlParser.js";
106
107
  import { ConstraintSpecificationContext } from "./ImpalaSqlParser.js";
@@ -109,6 +110,7 @@ import { ColumnSpecContext } from "./ImpalaSqlParser.js";
109
110
  import { ColumnDefinitionContext } from "./ImpalaSqlParser.js";
110
111
  import { KuduTableElementContext } from "./ImpalaSqlParser.js";
111
112
  import { KuduColumnDefinitionContext } from "./ImpalaSqlParser.js";
113
+ import { CommentClauseContext } from "./ImpalaSqlParser.js";
112
114
  import { ColumnSpecWithKuduContext } from "./ImpalaSqlParser.js";
113
115
  import { CreateColumnSpecWithKuduContext } from "./ImpalaSqlParser.js";
114
116
  import { KuduAttributesContext } from "./ImpalaSqlParser.js";
@@ -860,6 +862,12 @@ export declare class ImpalaSqlParserVisitor<Result> extends AbstractParseTreeVis
860
862
  * @return the visitor result
861
863
  */
862
864
  visitViewColumns?: (ctx: ViewColumnsContext) => Result;
865
+ /**
866
+ * Visit a parse tree produced by `ImpalaSqlParser.viewColumnItem`.
867
+ * @param ctx the parse tree
868
+ * @return the visitor result
869
+ */
870
+ visitViewColumnItem?: (ctx: ViewColumnItemContext) => Result;
863
871
  /**
864
872
  * Visit a parse tree produced by `ImpalaSqlParser.queryStatement`.
865
873
  * @param ctx the parse tree
@@ -908,6 +916,12 @@ export declare class ImpalaSqlParserVisitor<Result> extends AbstractParseTreeVis
908
916
  * @return the visitor result
909
917
  */
910
918
  visitKuduColumnDefinition?: (ctx: KuduColumnDefinitionContext) => Result;
919
+ /**
920
+ * Visit a parse tree produced by `ImpalaSqlParser.commentClause`.
921
+ * @param ctx the parse tree
922
+ * @return the visitor result
923
+ */
924
+ visitCommentClause?: (ctx: CommentClauseContext) => Result;
911
925
  /**
912
926
  * Visit a parse tree produced by `ImpalaSqlParser.columnSpecWithKudu`.
913
927
  * @param ctx the parse tree
@@ -1,7 +1,7 @@
1
1
  // Generated from dt-sql-parser/src/grammar/mysql/MySqlLexer.g4 by ANTLR 4.13.1
2
2
  // @ts-nocheck
3
3
  import * as antlr from "antlr4ng";
4
- class MySqlLexer extends antlr.Lexer {
4
+ export class MySqlLexer extends antlr.Lexer {
5
5
  constructor(input) {
6
6
  super(input);
7
7
  this.interpreter = new antlr.LexerATNSimulator(this, MySqlLexer._ATN, MySqlLexer.decisionsToDFA, new antlr.PredictionContextCache());
@@ -5492,4 +5492,3 @@ MySqlLexer._serializedATN = [
5492
5492
  ];
5493
5493
  MySqlLexer.vocabulary = new antlr.Vocabulary(MySqlLexer.literalNames, MySqlLexer.symbolicNames, []);
5494
5494
  MySqlLexer.decisionsToDFA = MySqlLexer._ATN.decisionToState.map((ds, index) => new antlr.DFA(ds, index));
5495
- export { MySqlLexer };