dt-sql-parser 4.1.2-beta.1 → 4.3.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/README.md +51 -0
- package/dist/lib/flink/FlinkSqlLexer.d.ts +2 -2
- package/dist/lib/flink/FlinkSqlLexer.js +21 -20
- package/dist/lib/flink/FlinkSqlParser.d.ts +178 -168
- package/dist/lib/flink/FlinkSqlParser.js +2799 -2741
- package/dist/lib/flink/FlinkSqlParserListener.d.ts +11 -0
- package/dist/lib/flink/FlinkSqlParserVisitor.d.ts +7 -0
- package/dist/lib/hive/HiveSqlParser.d.ts +241 -221
- package/dist/lib/hive/HiveSqlParser.js +6229 -5639
- package/dist/lib/hive/HiveSqlParserListener.d.ts +22 -0
- package/dist/lib/hive/HiveSqlParserVisitor.d.ts +14 -0
- package/dist/lib/impala/ImpalaSqlLexer.d.ts +2 -2
- package/dist/lib/impala/ImpalaSqlLexer.js +5 -5
- package/dist/lib/impala/ImpalaSqlParser.d.ts +147 -109
- package/dist/lib/impala/ImpalaSqlParser.js +3448 -3234
- package/dist/lib/impala/ImpalaSqlParserListener.d.ts +44 -0
- package/dist/lib/impala/ImpalaSqlParserVisitor.d.ts +28 -0
- package/dist/lib/mysql/MySqlLexer.d.ts +2 -2
- package/dist/lib/mysql/MySqlLexer.js +43 -43
- package/dist/lib/mysql/MySqlParser.d.ts +2 -2
- package/dist/lib/mysql/MySqlParser.js +42 -42
- package/dist/lib/postgresql/PostgreSqlLexer.d.ts +14 -15
- package/dist/lib/postgresql/PostgreSqlLexer.js +2077 -2092
- package/dist/lib/postgresql/PostgreSqlParser.d.ts +152 -131
- package/dist/lib/postgresql/PostgreSqlParser.js +10052 -9925
- package/dist/lib/postgresql/PostgreSqlParserListener.d.ts +22 -0
- package/dist/lib/postgresql/PostgreSqlParserVisitor.d.ts +14 -0
- package/dist/lib/spark/SparkSqlLexer.d.ts +2 -2
- package/dist/lib/spark/SparkSqlLexer.js +6 -6
- package/dist/lib/spark/SparkSqlParser.d.ts +391 -623
- package/dist/lib/spark/SparkSqlParser.js +6749 -8109
- package/dist/lib/spark/SparkSqlParserListener.d.ts +38 -326
- package/dist/lib/spark/SparkSqlParserVisitor.d.ts +24 -207
- package/dist/lib/trino/TrinoSqlLexer.d.ts +2 -2
- package/dist/lib/trino/TrinoSqlLexer.js +5 -5
- package/dist/lib/trino/TrinoSqlListener.d.ts +44 -0
- package/dist/lib/trino/TrinoSqlParser.d.ts +182 -153
- package/dist/lib/trino/TrinoSqlParser.js +4758 -4599
- package/dist/lib/trino/TrinoSqlVisitor.d.ts +28 -0
- package/dist/parser/common/basicSQL.d.ts +43 -9
- package/dist/parser/common/basicSQL.js +147 -40
- package/dist/parser/common/semanticContextCollector.d.ts +50 -0
- package/dist/parser/common/semanticContextCollector.js +202 -0
- package/dist/parser/common/tokenUtils.d.ts +12 -0
- package/dist/parser/common/tokenUtils.js +38 -0
- package/dist/parser/common/types.d.ts +30 -1
- package/dist/parser/common/types.js +11 -0
- package/dist/parser/flink/flinkErrorListener.js +14 -2
- package/dist/parser/flink/flinkSemanticContextCollector.d.ts +9 -0
- package/dist/parser/flink/flinkSemanticContextCollector.js +14 -0
- package/dist/parser/flink/index.d.ts +4 -2
- package/dist/parser/flink/index.js +32 -14
- package/dist/parser/hive/hiveErrorListener.js +9 -3
- package/dist/parser/hive/hiveSemanticContextCollector.d.ts +9 -0
- package/dist/parser/hive/hiveSemanticContextCollector.js +14 -0
- package/dist/parser/hive/index.d.ts +4 -2
- package/dist/parser/hive/index.js +29 -14
- package/dist/parser/impala/ImpalaErrorListener.js +8 -2
- package/dist/parser/impala/impalaSemanticContextCollector.d.ts +9 -0
- package/dist/parser/impala/impalaSemanticContextCollector.js +14 -0
- package/dist/parser/impala/index.d.ts +4 -2
- package/dist/parser/impala/index.js +21 -14
- package/dist/parser/mysql/index.d.ts +4 -2
- package/dist/parser/mysql/index.js +10 -14
- package/dist/parser/mysql/mysqlErrorListener.js +6 -2
- package/dist/parser/mysql/mysqlSemanticContextCollector.d.ts +9 -0
- package/dist/parser/mysql/mysqlSemanticContextCollector.js +14 -0
- package/dist/parser/postgresql/index.d.ts +4 -2
- package/dist/parser/postgresql/index.js +23 -14
- package/dist/parser/postgresql/postgreErrorListener.js +9 -3
- package/dist/parser/postgresql/postgreSemanticContextCollector.d.ts +9 -0
- package/dist/parser/postgresql/postgreSemanticContextCollector.js +14 -0
- package/dist/parser/spark/index.d.ts +4 -2
- package/dist/parser/spark/index.js +26 -14
- package/dist/parser/spark/sparkErrorListener.js +9 -3
- package/dist/parser/spark/sparkSemanticContextCollector.d.ts +9 -0
- package/dist/parser/spark/sparkSemanticContextCollector.js +14 -0
- package/dist/parser/trino/index.d.ts +4 -2
- package/dist/parser/trino/index.js +22 -14
- package/dist/parser/trino/trinoErrorListener.js +9 -3
- package/dist/parser/trino/trinoSemanticContextCollector.d.ts +9 -0
- package/dist/parser/trino/trinoSemanticContextCollector.js +14 -0
- package/package.json +2 -1
|
@@ -362,6 +362,7 @@ import { DocumentOrContentContext } from "./PostgreSqlParser.js";
|
|
|
362
362
|
import { XmlExistsArgumentContext } from "./PostgreSqlParser.js";
|
|
363
363
|
import { XmlPassingMechContext } from "./PostgreSqlParser.js";
|
|
364
364
|
import { WindowClauseContext } from "./PostgreSqlParser.js";
|
|
365
|
+
import { HavingClauseContext } from "./PostgreSqlParser.js";
|
|
365
366
|
import { WindowDefinitionContext } from "./PostgreSqlParser.js";
|
|
366
367
|
import { Over_clauseContext } from "./PostgreSqlParser.js";
|
|
367
368
|
import { WindowSpecificationContext } from "./PostgreSqlParser.js";
|
|
@@ -412,6 +413,7 @@ import { RoutineNameContext } from "./PostgreSqlParser.js";
|
|
|
412
413
|
import { ProcedureNameContext } from "./PostgreSqlParser.js";
|
|
413
414
|
import { ProcedureNameCreateContext } from "./PostgreSqlParser.js";
|
|
414
415
|
import { ColumnNameContext } from "./PostgreSqlParser.js";
|
|
416
|
+
import { ColumnNamePathContext } from "./PostgreSqlParser.js";
|
|
415
417
|
import { ColumnNameCreateContext } from "./PostgreSqlParser.js";
|
|
416
418
|
import { FunctionNameCreateContext } from "./PostgreSqlParser.js";
|
|
417
419
|
import { FunctionNameContext } from "./PostgreSqlParser.js";
|
|
@@ -4162,6 +4164,16 @@ export declare class PostgreSqlParserListener implements ParseTreeListener {
|
|
|
4162
4164
|
* @param ctx the parse tree
|
|
4163
4165
|
*/
|
|
4164
4166
|
exitWindowClause?: (ctx: WindowClauseContext) => void;
|
|
4167
|
+
/**
|
|
4168
|
+
* Enter a parse tree produced by `PostgreSqlParser.havingClause`.
|
|
4169
|
+
* @param ctx the parse tree
|
|
4170
|
+
*/
|
|
4171
|
+
enterHavingClause?: (ctx: HavingClauseContext) => void;
|
|
4172
|
+
/**
|
|
4173
|
+
* Exit a parse tree produced by `PostgreSqlParser.havingClause`.
|
|
4174
|
+
* @param ctx the parse tree
|
|
4175
|
+
*/
|
|
4176
|
+
exitHavingClause?: (ctx: HavingClauseContext) => void;
|
|
4165
4177
|
/**
|
|
4166
4178
|
* Enter a parse tree produced by `PostgreSqlParser.windowDefinition`.
|
|
4167
4179
|
* @param ctx the parse tree
|
|
@@ -4666,6 +4678,16 @@ export declare class PostgreSqlParserListener implements ParseTreeListener {
|
|
|
4666
4678
|
* @param ctx the parse tree
|
|
4667
4679
|
*/
|
|
4668
4680
|
exitColumnName?: (ctx: ColumnNameContext) => void;
|
|
4681
|
+
/**
|
|
4682
|
+
* Enter a parse tree produced by `PostgreSqlParser.columnNamePath`.
|
|
4683
|
+
* @param ctx the parse tree
|
|
4684
|
+
*/
|
|
4685
|
+
enterColumnNamePath?: (ctx: ColumnNamePathContext) => void;
|
|
4686
|
+
/**
|
|
4687
|
+
* Exit a parse tree produced by `PostgreSqlParser.columnNamePath`.
|
|
4688
|
+
* @param ctx the parse tree
|
|
4689
|
+
*/
|
|
4690
|
+
exitColumnNamePath?: (ctx: ColumnNamePathContext) => void;
|
|
4669
4691
|
/**
|
|
4670
4692
|
* Enter a parse tree produced by `PostgreSqlParser.columnNameCreate`.
|
|
4671
4693
|
* @param ctx the parse tree
|
|
@@ -362,6 +362,7 @@ import { DocumentOrContentContext } from "./PostgreSqlParser.js";
|
|
|
362
362
|
import { XmlExistsArgumentContext } from "./PostgreSqlParser.js";
|
|
363
363
|
import { XmlPassingMechContext } from "./PostgreSqlParser.js";
|
|
364
364
|
import { WindowClauseContext } from "./PostgreSqlParser.js";
|
|
365
|
+
import { HavingClauseContext } from "./PostgreSqlParser.js";
|
|
365
366
|
import { WindowDefinitionContext } from "./PostgreSqlParser.js";
|
|
366
367
|
import { Over_clauseContext } from "./PostgreSqlParser.js";
|
|
367
368
|
import { WindowSpecificationContext } from "./PostgreSqlParser.js";
|
|
@@ -412,6 +413,7 @@ import { RoutineNameContext } from "./PostgreSqlParser.js";
|
|
|
412
413
|
import { ProcedureNameContext } from "./PostgreSqlParser.js";
|
|
413
414
|
import { ProcedureNameCreateContext } from "./PostgreSqlParser.js";
|
|
414
415
|
import { ColumnNameContext } from "./PostgreSqlParser.js";
|
|
416
|
+
import { ColumnNamePathContext } from "./PostgreSqlParser.js";
|
|
415
417
|
import { ColumnNameCreateContext } from "./PostgreSqlParser.js";
|
|
416
418
|
import { FunctionNameCreateContext } from "./PostgreSqlParser.js";
|
|
417
419
|
import { FunctionNameContext } from "./PostgreSqlParser.js";
|
|
@@ -2688,6 +2690,12 @@ export declare class PostgreSqlParserVisitor<Result> extends AbstractParseTreeVi
|
|
|
2688
2690
|
* @return the visitor result
|
|
2689
2691
|
*/
|
|
2690
2692
|
visitWindowClause?: (ctx: WindowClauseContext) => Result;
|
|
2693
|
+
/**
|
|
2694
|
+
* Visit a parse tree produced by `PostgreSqlParser.havingClause`.
|
|
2695
|
+
* @param ctx the parse tree
|
|
2696
|
+
* @return the visitor result
|
|
2697
|
+
*/
|
|
2698
|
+
visitHavingClause?: (ctx: HavingClauseContext) => Result;
|
|
2691
2699
|
/**
|
|
2692
2700
|
* Visit a parse tree produced by `PostgreSqlParser.windowDefinition`.
|
|
2693
2701
|
* @param ctx the parse tree
|
|
@@ -2990,6 +2998,12 @@ export declare class PostgreSqlParserVisitor<Result> extends AbstractParseTreeVi
|
|
|
2990
2998
|
* @return the visitor result
|
|
2991
2999
|
*/
|
|
2992
3000
|
visitColumnName?: (ctx: ColumnNameContext) => Result;
|
|
3001
|
+
/**
|
|
3002
|
+
* Visit a parse tree produced by `PostgreSqlParser.columnNamePath`.
|
|
3003
|
+
* @param ctx the parse tree
|
|
3004
|
+
* @return the visitor result
|
|
3005
|
+
*/
|
|
3006
|
+
visitColumnNamePath?: (ctx: ColumnNamePathContext) => Result;
|
|
2993
3007
|
/**
|
|
2994
3008
|
* Visit a parse tree produced by `PostgreSqlParser.columnNameCreate`.
|
|
2995
3009
|
* @param ctx the parse tree
|
|
@@ -389,9 +389,9 @@ export declare class SparkSqlLexer extends antlr.Lexer {
|
|
|
389
389
|
static readonly BIGDECIMAL_LITERAL = 387;
|
|
390
390
|
static readonly IDENTIFIER = 388;
|
|
391
391
|
static readonly BACKQUOTED_IDENTIFIER = 389;
|
|
392
|
-
static readonly
|
|
392
|
+
static readonly LINE_COMMENT = 390;
|
|
393
393
|
static readonly BRACKETED_COMMENT = 391;
|
|
394
|
-
static readonly
|
|
394
|
+
static readonly WHITE_SPACE = 392;
|
|
395
395
|
static readonly UNRECOGNIZED = 393;
|
|
396
396
|
static readonly channelNames: string[];
|
|
397
397
|
static readonly literalNames: (string | null)[];
|
|
@@ -439,9 +439,9 @@ SparkSqlLexer.DOUBLE_LITERAL = 386;
|
|
|
439
439
|
SparkSqlLexer.BIGDECIMAL_LITERAL = 387;
|
|
440
440
|
SparkSqlLexer.IDENTIFIER = 388;
|
|
441
441
|
SparkSqlLexer.BACKQUOTED_IDENTIFIER = 389;
|
|
442
|
-
SparkSqlLexer.
|
|
442
|
+
SparkSqlLexer.LINE_COMMENT = 390;
|
|
443
443
|
SparkSqlLexer.BRACKETED_COMMENT = 391;
|
|
444
|
-
SparkSqlLexer.
|
|
444
|
+
SparkSqlLexer.WHITE_SPACE = 392;
|
|
445
445
|
SparkSqlLexer.UNRECOGNIZED = 393;
|
|
446
446
|
SparkSqlLexer.channelNames = [
|
|
447
447
|
"DEFAULT_TOKEN_CHANNEL", "HIDDEN"
|
|
@@ -589,8 +589,8 @@ SparkSqlLexer.symbolicNames = [
|
|
|
589
589
|
"HENT_START", "HENT_END", "QUESTION", "STRING_LITERAL", "DOUBLEQUOTED_STRING",
|
|
590
590
|
"BIGINT_LITERAL", "SMALLINT_LITERAL", "TINYINT_LITERAL", "INTEGER_VALUE",
|
|
591
591
|
"EXPONENT_VALUE", "DECIMAL_VALUE", "FLOAT_LITERAL", "DOUBLE_LITERAL",
|
|
592
|
-
"BIGDECIMAL_LITERAL", "IDENTIFIER", "BACKQUOTED_IDENTIFIER", "
|
|
593
|
-
"BRACKETED_COMMENT", "
|
|
592
|
+
"BIGDECIMAL_LITERAL", "IDENTIFIER", "BACKQUOTED_IDENTIFIER", "LINE_COMMENT",
|
|
593
|
+
"BRACKETED_COMMENT", "WHITE_SPACE", "UNRECOGNIZED"
|
|
594
594
|
];
|
|
595
595
|
SparkSqlLexer.modeNames = [
|
|
596
596
|
"DEFAULT_MODE",
|
|
@@ -670,8 +670,8 @@ SparkSqlLexer.ruleNames = [
|
|
|
670
670
|
"BIGINT_LITERAL", "SMALLINT_LITERAL", "TINYINT_LITERAL", "INTEGER_VALUE",
|
|
671
671
|
"EXPONENT_VALUE", "DECIMAL_VALUE", "FLOAT_LITERAL", "DOUBLE_LITERAL",
|
|
672
672
|
"BIGDECIMAL_LITERAL", "IDENTIFIER", "BACKQUOTED_IDENTIFIER", "DECIMAL_DIGITS",
|
|
673
|
-
"EXPONENT", "DIGIT", "LETTER", "
|
|
674
|
-
"
|
|
673
|
+
"EXPONENT", "DIGIT", "LETTER", "LINE_COMMENT", "BRACKETED_COMMENT",
|
|
674
|
+
"WHITE_SPACE", "UNRECOGNIZED",
|
|
675
675
|
];
|
|
676
676
|
SparkSqlLexer._serializedATN = [
|
|
677
677
|
4, 0, 393, 3706, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7,
|