dt-sql-parser 4.5.0-beta.1 → 4.5.0-beta.2

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 (62) hide show
  1. package/dist/index.d.ts +3 -2
  2. package/dist/index.js +2 -2
  3. package/dist/lib/SQLParserBase.d.ts +1 -13
  4. package/dist/lib/SQLParserBase.js +5 -40
  5. package/dist/lib/flink/FlinkSqlParser.d.ts +179 -222
  6. package/dist/lib/flink/FlinkSqlParser.js +2949 -3300
  7. package/dist/lib/flink/FlinkSqlParserListener.d.ts +0 -33
  8. package/dist/lib/flink/FlinkSqlParserVisitor.d.ts +0 -21
  9. package/dist/lib/generic/GenericSqlLexer.d.ts +143 -0
  10. package/dist/lib/generic/GenericSqlLexer.js +603 -0
  11. package/dist/lib/generic/GenericSqlListener.d.ts +1089 -0
  12. package/dist/lib/generic/GenericSqlListener.js +11 -0
  13. package/dist/lib/generic/GenericSqlParser.d.ts +1272 -0
  14. package/dist/lib/generic/GenericSqlParser.js +7641 -0
  15. package/dist/lib/generic/GenericSqlVisitor.d.ts +684 -0
  16. package/dist/lib/generic/GenericSqlVisitor.js +12 -0
  17. package/dist/lib/hive/HiveSqlParser.d.ts +228 -274
  18. package/dist/lib/hive/HiveSqlParser.js +5912 -6304
  19. package/dist/lib/hive/HiveSqlParserListener.d.ts +0 -33
  20. package/dist/lib/hive/HiveSqlParserVisitor.d.ts +0 -21
  21. package/dist/lib/impala/ImpalaSqlParser.d.ts +103 -145
  22. package/dist/lib/impala/ImpalaSqlParser.js +3320 -3687
  23. package/dist/lib/impala/ImpalaSqlParserListener.d.ts +0 -33
  24. package/dist/lib/impala/ImpalaSqlParserVisitor.d.ts +0 -21
  25. package/dist/lib/index.d.ts +2 -0
  26. package/dist/lib/index.js +2 -0
  27. package/dist/lib/mysql/MySqlParser.d.ts +94 -161
  28. package/dist/lib/mysql/MySqlParser.js +9499 -9959
  29. package/dist/lib/mysql/MySqlParserListener.d.ts +5 -79
  30. package/dist/lib/mysql/MySqlParserVisitor.d.ts +3 -49
  31. package/dist/lib/postgresql/PostgreSqlParser.d.ts +71 -108
  32. package/dist/lib/postgresql/PostgreSqlParser.js +10388 -13330
  33. package/dist/lib/postgresql/PostgreSqlParserListener.d.ts +0 -48
  34. package/dist/lib/postgresql/PostgreSqlParserVisitor.d.ts +0 -30
  35. package/dist/lib/spark/SparkSqlParser.d.ts +145 -185
  36. package/dist/lib/spark/SparkSqlParser.js +5109 -5420
  37. package/dist/lib/spark/SparkSqlParserListener.d.ts +0 -33
  38. package/dist/lib/spark/SparkSqlParserVisitor.d.ts +0 -21
  39. package/dist/parser/common/basicSQL.d.ts +5 -5
  40. package/dist/parser/common/basicSQL.js +3 -3
  41. package/dist/parser/common/entityCollector.js +2 -14
  42. package/dist/parser/flink/index.js +2 -5
  43. package/dist/parser/generic/genericEntityCollector.d.ts +29 -0
  44. package/dist/parser/generic/genericEntityCollector.js +103 -0
  45. package/dist/parser/generic/genericErrorListener.d.ts +6 -0
  46. package/dist/parser/generic/genericErrorListener.js +56 -0
  47. package/dist/parser/generic/genericSemanticContextCollector.d.ts +9 -0
  48. package/dist/parser/generic/genericSemanticContextCollector.js +14 -0
  49. package/dist/parser/generic/genericSplitListener.d.ts +6 -0
  50. package/dist/parser/generic/genericSplitListener.js +6 -0
  51. package/dist/parser/generic/index.d.ts +33 -0
  52. package/dist/parser/generic/index.js +94 -0
  53. package/dist/parser/index.d.ts +1 -0
  54. package/dist/parser/index.js +1 -0
  55. package/dist/parser/mysql/index.js +1 -3
  56. package/dist/parser/mysql/mysqlEntityCollector.d.ts +1 -2
  57. package/dist/parser/mysql/mysqlEntityCollector.js +3 -13
  58. package/dist/parser/mysql/mysqlErrorListener.js +0 -2
  59. package/dist/parser/postgresql/postgreEntityCollector.d.ts +1 -3
  60. package/dist/parser/postgresql/postgreEntityCollector.js +0 -13
  61. package/dist/parser/spark/index.js +1 -3
  62. package/package.json +1 -1
@@ -25,10 +25,8 @@ import { CreateTableAsSelectContext } from "./FlinkSqlParser.js";
25
25
  import { ColumnOptionDefinitionContext } from "./FlinkSqlParser.js";
26
26
  import { PhysicalColumnDefinitionContext } from "./FlinkSqlParser.js";
27
27
  import { ColumnNameCreateContext } from "./FlinkSqlParser.js";
28
- import { EmptyColumnContext } from "./FlinkSqlParser.js";
29
28
  import { ColumnNameContext } from "./FlinkSqlParser.js";
30
29
  import { ColumnNamePathContext } from "./FlinkSqlParser.js";
31
- import { ColumnNamePathAllowEmptyContext } from "./FlinkSqlParser.js";
32
30
  import { ColumnNameListContext } from "./FlinkSqlParser.js";
33
31
  import { ColumnTypeContext } from "./FlinkSqlParser.js";
34
32
  import { LengthOneDimensionContext } from "./FlinkSqlParser.js";
@@ -203,7 +201,6 @@ import { TablePathContext } from "./FlinkSqlParser.js";
203
201
  import { ViewPathContext } from "./FlinkSqlParser.js";
204
202
  import { ViewPathCreateContext } from "./FlinkSqlParser.js";
205
203
  import { UidContext } from "./FlinkSqlParser.js";
206
- import { UidAllowEmptyContext } from "./FlinkSqlParser.js";
207
204
  import { WithOptionContext } from "./FlinkSqlParser.js";
208
205
  import { IfNotExistsContext } from "./FlinkSqlParser.js";
209
206
  import { IfExistsContext } from "./FlinkSqlParser.js";
@@ -494,16 +491,6 @@ export declare class FlinkSqlParserListener implements ParseTreeListener {
494
491
  * @param ctx the parse tree
495
492
  */
496
493
  exitColumnNameCreate?: (ctx: ColumnNameCreateContext) => void;
497
- /**
498
- * Enter a parse tree produced by `FlinkSqlParser.emptyColumn`.
499
- * @param ctx the parse tree
500
- */
501
- enterEmptyColumn?: (ctx: EmptyColumnContext) => void;
502
- /**
503
- * Exit a parse tree produced by `FlinkSqlParser.emptyColumn`.
504
- * @param ctx the parse tree
505
- */
506
- exitEmptyColumn?: (ctx: EmptyColumnContext) => void;
507
494
  /**
508
495
  * Enter a parse tree produced by `FlinkSqlParser.columnName`.
509
496
  * @param ctx the parse tree
@@ -524,16 +511,6 @@ export declare class FlinkSqlParserListener implements ParseTreeListener {
524
511
  * @param ctx the parse tree
525
512
  */
526
513
  exitColumnNamePath?: (ctx: ColumnNamePathContext) => void;
527
- /**
528
- * Enter a parse tree produced by `FlinkSqlParser.columnNamePathAllowEmpty`.
529
- * @param ctx the parse tree
530
- */
531
- enterColumnNamePathAllowEmpty?: (ctx: ColumnNamePathAllowEmptyContext) => void;
532
- /**
533
- * Exit a parse tree produced by `FlinkSqlParser.columnNamePathAllowEmpty`.
534
- * @param ctx the parse tree
535
- */
536
- exitColumnNamePathAllowEmpty?: (ctx: ColumnNamePathAllowEmptyContext) => void;
537
514
  /**
538
515
  * Enter a parse tree produced by `FlinkSqlParser.columnNameList`.
539
516
  * @param ctx the parse tree
@@ -2334,16 +2311,6 @@ export declare class FlinkSqlParserListener implements ParseTreeListener {
2334
2311
  * @param ctx the parse tree
2335
2312
  */
2336
2313
  exitUid?: (ctx: UidContext) => void;
2337
- /**
2338
- * Enter a parse tree produced by `FlinkSqlParser.uidAllowEmpty`.
2339
- * @param ctx the parse tree
2340
- */
2341
- enterUidAllowEmpty?: (ctx: UidAllowEmptyContext) => void;
2342
- /**
2343
- * Exit a parse tree produced by `FlinkSqlParser.uidAllowEmpty`.
2344
- * @param ctx the parse tree
2345
- */
2346
- exitUidAllowEmpty?: (ctx: UidAllowEmptyContext) => void;
2347
2314
  /**
2348
2315
  * Enter a parse tree produced by `FlinkSqlParser.withOption`.
2349
2316
  * @param ctx the parse tree
@@ -25,10 +25,8 @@ import { CreateTableAsSelectContext } from "./FlinkSqlParser.js";
25
25
  import { ColumnOptionDefinitionContext } from "./FlinkSqlParser.js";
26
26
  import { PhysicalColumnDefinitionContext } from "./FlinkSqlParser.js";
27
27
  import { ColumnNameCreateContext } from "./FlinkSqlParser.js";
28
- import { EmptyColumnContext } from "./FlinkSqlParser.js";
29
28
  import { ColumnNameContext } from "./FlinkSqlParser.js";
30
29
  import { ColumnNamePathContext } from "./FlinkSqlParser.js";
31
- import { ColumnNamePathAllowEmptyContext } from "./FlinkSqlParser.js";
32
30
  import { ColumnNameListContext } from "./FlinkSqlParser.js";
33
31
  import { ColumnTypeContext } from "./FlinkSqlParser.js";
34
32
  import { LengthOneDimensionContext } from "./FlinkSqlParser.js";
@@ -203,7 +201,6 @@ import { TablePathContext } from "./FlinkSqlParser.js";
203
201
  import { ViewPathContext } from "./FlinkSqlParser.js";
204
202
  import { ViewPathCreateContext } from "./FlinkSqlParser.js";
205
203
  import { UidContext } from "./FlinkSqlParser.js";
206
- import { UidAllowEmptyContext } from "./FlinkSqlParser.js";
207
204
  import { WithOptionContext } from "./FlinkSqlParser.js";
208
205
  import { IfNotExistsContext } from "./FlinkSqlParser.js";
209
206
  import { IfExistsContext } from "./FlinkSqlParser.js";
@@ -393,12 +390,6 @@ export declare class FlinkSqlParserVisitor<Result> extends AbstractParseTreeVisi
393
390
  * @return the visitor result
394
391
  */
395
392
  visitColumnNameCreate?: (ctx: ColumnNameCreateContext) => Result;
396
- /**
397
- * Visit a parse tree produced by `FlinkSqlParser.emptyColumn`.
398
- * @param ctx the parse tree
399
- * @return the visitor result
400
- */
401
- visitEmptyColumn?: (ctx: EmptyColumnContext) => Result;
402
393
  /**
403
394
  * Visit a parse tree produced by `FlinkSqlParser.columnName`.
404
395
  * @param ctx the parse tree
@@ -411,12 +402,6 @@ export declare class FlinkSqlParserVisitor<Result> extends AbstractParseTreeVisi
411
402
  * @return the visitor result
412
403
  */
413
404
  visitColumnNamePath?: (ctx: ColumnNamePathContext) => Result;
414
- /**
415
- * Visit a parse tree produced by `FlinkSqlParser.columnNamePathAllowEmpty`.
416
- * @param ctx the parse tree
417
- * @return the visitor result
418
- */
419
- visitColumnNamePathAllowEmpty?: (ctx: ColumnNamePathAllowEmptyContext) => Result;
420
405
  /**
421
406
  * Visit a parse tree produced by `FlinkSqlParser.columnNameList`.
422
407
  * @param ctx the parse tree
@@ -1491,12 +1476,6 @@ export declare class FlinkSqlParserVisitor<Result> extends AbstractParseTreeVisi
1491
1476
  * @return the visitor result
1492
1477
  */
1493
1478
  visitUid?: (ctx: UidContext) => Result;
1494
- /**
1495
- * Visit a parse tree produced by `FlinkSqlParser.uidAllowEmpty`.
1496
- * @param ctx the parse tree
1497
- * @return the visitor result
1498
- */
1499
- visitUidAllowEmpty?: (ctx: UidAllowEmptyContext) => Result;
1500
1479
  /**
1501
1480
  * Visit a parse tree produced by `FlinkSqlParser.withOption`.
1502
1481
  * @param ctx the parse tree
@@ -0,0 +1,143 @@
1
+ import * as antlr from "antlr4ng";
2
+ export declare class GenericSqlLexer extends antlr.Lexer {
3
+ static readonly T__0 = 1;
4
+ static readonly T__1 = 2;
5
+ static readonly T__2 = 3;
6
+ static readonly T__3 = 4;
7
+ static readonly KW_ADD = 5;
8
+ static readonly KW_ALL = 6;
9
+ static readonly KW_ALTER = 7;
10
+ static readonly KW_AND = 8;
11
+ static readonly KW_AS = 9;
12
+ static readonly KW_ASC = 10;
13
+ static readonly KW_BETWEEN = 11;
14
+ static readonly KW_BIGINT = 12;
15
+ static readonly KW_BINARY = 13;
16
+ static readonly KW_BOOLEAN = 14;
17
+ static readonly KW_BY = 15;
18
+ static readonly KW_CASE = 16;
19
+ static readonly KW_CAST = 17;
20
+ static readonly KW_CHAR = 18;
21
+ static readonly KW_CHECK = 19;
22
+ static readonly KW_COALESCE = 20;
23
+ static readonly KW_COLUMN = 21;
24
+ static readonly KW_CONSTRAINT = 22;
25
+ static readonly KW_CREATE = 23;
26
+ static readonly KW_CROSS = 24;
27
+ static readonly KW_DATE = 25;
28
+ static readonly KW_DECIMAL = 26;
29
+ static readonly KW_DEFAULT = 27;
30
+ static readonly KW_DELETE = 28;
31
+ static readonly KW_DESC = 29;
32
+ static readonly KW_DISTINCT = 30;
33
+ static readonly KW_DOUBLE = 31;
34
+ static readonly KW_DROP = 32;
35
+ static readonly KW_ELSE = 33;
36
+ static readonly KW_END = 34;
37
+ static readonly KW_ESCAPE = 35;
38
+ static readonly KW_EXCEPT = 36;
39
+ static readonly KW_EXISTS = 37;
40
+ static readonly KW_FALSE = 38;
41
+ static readonly KW_FIRST = 39;
42
+ static readonly KW_FLOAT = 40;
43
+ static readonly KW_FOREIGN = 41;
44
+ static readonly KW_FROM = 42;
45
+ static readonly KW_FULL = 43;
46
+ static readonly KW_GROUP = 44;
47
+ static readonly KW_HAVING = 45;
48
+ static readonly KW_IF = 46;
49
+ static readonly KW_IN = 47;
50
+ static readonly KW_INNER = 48;
51
+ static readonly KW_INSERT = 49;
52
+ static readonly KW_INT = 50;
53
+ static readonly KW_INTEGER = 51;
54
+ static readonly KW_INTERSECT = 52;
55
+ static readonly KW_INTO = 53;
56
+ static readonly KW_IS = 54;
57
+ static readonly KW_JOIN = 55;
58
+ static readonly KW_KEY = 56;
59
+ static readonly KW_LAST = 57;
60
+ static readonly KW_LEFT = 58;
61
+ static readonly KW_LIKE = 59;
62
+ static readonly KW_LIMIT = 60;
63
+ static readonly KW_NOT = 61;
64
+ static readonly KW_NULL = 62;
65
+ static readonly KW_NULLIF = 63;
66
+ static readonly KW_NULLS = 64;
67
+ static readonly KW_NUMERIC = 65;
68
+ static readonly KW_OFFSET = 66;
69
+ static readonly KW_ON = 67;
70
+ static readonly KW_OR = 68;
71
+ static readonly KW_ORDER = 69;
72
+ static readonly KW_OUTER = 70;
73
+ static readonly KW_PRIMARY = 71;
74
+ static readonly KW_RECURSIVE = 72;
75
+ static readonly KW_REFERENCES = 73;
76
+ static readonly KW_RENAME = 74;
77
+ static readonly KW_RIGHT = 75;
78
+ static readonly KW_SELECT = 76;
79
+ static readonly KW_SET = 77;
80
+ static readonly KW_SMALLINT = 78;
81
+ static readonly KW_TABLE = 79;
82
+ static readonly KW_TEXT = 80;
83
+ static readonly KW_THEN = 81;
84
+ static readonly KW_TIME = 82;
85
+ static readonly KW_TIMESTAMP = 83;
86
+ static readonly KW_TINYINT = 84;
87
+ static readonly KW_TO = 85;
88
+ static readonly KW_TRUE = 86;
89
+ static readonly KW_UNION = 87;
90
+ static readonly KW_UNIQUE = 88;
91
+ static readonly KW_UPDATE = 89;
92
+ static readonly KW_VARCHAR = 90;
93
+ static readonly KW_VARBINARY = 91;
94
+ static readonly KW_WHEN = 92;
95
+ static readonly KW_WHERE = 93;
96
+ static readonly KW_WITH = 94;
97
+ static readonly EQ = 95;
98
+ static readonly NEQ = 96;
99
+ static readonly LT = 97;
100
+ static readonly LTE = 98;
101
+ static readonly GT = 99;
102
+ static readonly GTE = 100;
103
+ static readonly PLUS = 101;
104
+ static readonly MINUS = 102;
105
+ static readonly ASTERISK = 103;
106
+ static readonly SLASH = 104;
107
+ static readonly PERCENT = 105;
108
+ static readonly CONCAT = 106;
109
+ static readonly QUESTION_MARK = 107;
110
+ static readonly SEMICOLON = 108;
111
+ static readonly STRING = 109;
112
+ static readonly BINARY_LITERAL = 110;
113
+ static readonly INTEGER_VALUE = 111;
114
+ static readonly DECIMAL_VALUE = 112;
115
+ static readonly DOUBLE_VALUE = 113;
116
+ static readonly IDENTIFIER = 114;
117
+ static readonly DIGIT_IDENTIFIER = 115;
118
+ static readonly QUOTED_IDENTIFIER = 116;
119
+ static readonly BACKQUOTED_IDENTIFIER = 117;
120
+ static readonly LINE_COMMENT = 118;
121
+ static readonly BRACKETED_COMMENT = 119;
122
+ static readonly WHITE_SPACE = 120;
123
+ static readonly UNRECOGNIZED = 121;
124
+ static readonly channelNames: string[];
125
+ static readonly literalNames: (string | null)[];
126
+ static readonly symbolicNames: (string | null)[];
127
+ static readonly modeNames: string[];
128
+ static readonly ruleNames: string[];
129
+ constructor(input: antlr.CharStream);
130
+ get grammarFileName(): string;
131
+ get literalNames(): (string | null)[];
132
+ get symbolicNames(): (string | null)[];
133
+ get ruleNames(): string[];
134
+ get serializedATN(): number[];
135
+ get channelNames(): string[];
136
+ get modeNames(): string[];
137
+ static readonly _serializedATN: number[];
138
+ private static __ATN;
139
+ static get _ATN(): antlr.ATN;
140
+ private static readonly vocabulary;
141
+ get vocabulary(): antlr.Vocabulary;
142
+ private static readonly decisionsToDFA;
143
+ }