dt-sql-parser 4.0.2 → 4.1.0-beta.1
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 +6 -1
- package/dist/lib/flink/FlinkSqlLexer.js +1 -2
- package/dist/lib/flink/FlinkSqlParser.d.ts +175 -174
- package/dist/lib/flink/FlinkSqlParser.js +2315 -2388
- package/dist/lib/flink/FlinkSqlParserListener.d.ts +5 -16
- package/dist/lib/flink/FlinkSqlParserVisitor.d.ts +3 -10
- package/dist/lib/hive/HiveSqlLexer.js +1 -2
- package/dist/lib/hive/HiveSqlParser.d.ts +3 -1
- package/dist/lib/hive/HiveSqlParser.js +8 -9
- package/dist/lib/impala/ImpalaSqlLexer.js +1 -2
- package/dist/lib/impala/ImpalaSqlParser.d.ts +123 -107
- package/dist/lib/impala/ImpalaSqlParser.js +3223 -3155
- package/dist/lib/impala/ImpalaSqlParserListener.d.ts +22 -0
- package/dist/lib/impala/ImpalaSqlParserVisitor.d.ts +14 -0
- package/dist/lib/mysql/MySqlLexer.js +1 -2
- package/dist/lib/mysql/MySqlParser.d.ts +469 -422
- package/dist/lib/mysql/MySqlParser.js +11460 -10509
- package/dist/lib/mysql/MySqlParserListener.d.ts +33 -11
- package/dist/lib/mysql/MySqlParserVisitor.d.ts +21 -7
- package/dist/lib/postgresql/PostgreSqlLexer.js +1 -2
- package/dist/lib/postgresql/PostgreSqlParser.d.ts +2025 -6265
- package/dist/lib/postgresql/PostgreSqlParser.js +60092 -88368
- package/dist/lib/postgresql/PostgreSqlParserListener.d.ts +1688 -6083
- package/dist/lib/postgresql/PostgreSqlParserVisitor.d.ts +712 -3511
- package/dist/lib/spark/SparkSqlLexer.js +1 -2
- package/dist/lib/spark/SparkSqlParser.d.ts +16 -13
- package/dist/lib/spark/SparkSqlParser.js +50 -51
- package/dist/lib/spark/SparkSqlParserListener.d.ts +10 -10
- package/dist/lib/spark/SparkSqlParserVisitor.d.ts +6 -6
- package/dist/lib/trino/TrinoSqlLexer.d.ts +323 -260
- package/dist/lib/trino/TrinoSqlLexer.js +1610 -1264
- package/dist/lib/trino/TrinoSqlListener.d.ts +1311 -200
- package/dist/lib/trino/TrinoSqlParser.d.ts +1908 -562
- package/dist/lib/trino/TrinoSqlParser.js +22629 -13412
- package/dist/lib/trino/TrinoSqlVisitor.d.ts +761 -69
- package/dist/locale/locale.d.ts +41 -0
- package/dist/locale/locale.js +43 -0
- package/dist/parser/common/basicSQL.d.ts +9 -4
- package/dist/parser/common/basicSQL.js +64 -21
- package/dist/parser/common/entityCollector.d.ts +60 -12
- package/dist/parser/common/entityCollector.js +141 -17
- package/dist/parser/common/parseErrorListener.d.ts +6 -3
- package/dist/parser/common/parseErrorListener.js +83 -2
- package/dist/parser/common/textAndWord.d.ts +6 -9
- package/dist/parser/common/textAndWord.js +9 -20
- package/dist/parser/common/transform.d.ts +8 -0
- package/dist/parser/common/transform.js +11 -0
- package/dist/parser/common/types.d.ts +1 -0
- package/dist/parser/flink/flinkEntityCollector.js +40 -6
- package/dist/parser/flink/flinkErrorListener.d.ts +9 -0
- package/dist/parser/flink/flinkErrorListener.js +67 -0
- package/dist/parser/flink/index.d.ts +4 -1
- package/dist/parser/flink/index.js +16 -12
- package/dist/parser/hive/hiveEntityCollector.js +40 -6
- package/dist/parser/hive/hiveErrorListener.d.ts +9 -0
- package/dist/parser/hive/hiveErrorListener.js +65 -0
- package/dist/parser/hive/index.d.ts +4 -1
- package/dist/parser/hive/index.js +16 -12
- package/dist/parser/impala/ImpalaErrorListener.d.ts +9 -0
- package/dist/parser/impala/ImpalaErrorListener.js +63 -0
- package/dist/parser/impala/impalaEntityCollector.js +51 -6
- package/dist/parser/impala/index.d.ts +4 -1
- package/dist/parser/impala/index.js +7 -3
- package/dist/parser/mysql/index.d.ts +4 -1
- package/dist/parser/mysql/index.js +7 -3
- package/dist/parser/mysql/mysqlEntityCollector.d.ts +3 -1
- package/dist/parser/mysql/mysqlEntityCollector.js +40 -5
- package/dist/parser/mysql/mysqlErrorListener.d.ts +9 -0
- package/dist/parser/mysql/mysqlErrorListener.js +63 -0
- package/dist/parser/postgresql/index.d.ts +4 -1
- package/dist/parser/postgresql/index.js +20 -16
- package/dist/parser/postgresql/postgreEntityCollector.d.ts +5 -1
- package/dist/parser/postgresql/postgreEntityCollector.js +44 -4
- package/dist/parser/postgresql/postgreErrorListener.d.ts +9 -0
- package/dist/parser/postgresql/postgreErrorListener.js +71 -0
- package/dist/parser/spark/index.d.ts +4 -1
- package/dist/parser/spark/index.js +7 -3
- package/dist/parser/spark/sparkEntityCollector.d.ts +1 -1
- package/dist/parser/spark/sparkEntityCollector.js +43 -6
- package/dist/parser/spark/sparkErrorListener.d.ts +9 -0
- package/dist/parser/spark/sparkErrorListener.js +63 -0
- package/dist/parser/trino/index.d.ts +4 -1
- package/dist/parser/trino/index.js +26 -13
- package/dist/parser/trino/trinoEntityCollector.d.ts +6 -4
- package/dist/parser/trino/trinoEntityCollector.js +44 -9
- package/dist/parser/trino/trinoErrorListener.d.ts +9 -0
- package/dist/parser/trino/trinoErrorListener.js +65 -0
- package/package.json +35 -11
|
@@ -16,6 +16,8 @@ import { CreateEventContext } from "./MySqlParser.js";
|
|
|
16
16
|
import { CreateIndexContext } from "./MySqlParser.js";
|
|
17
17
|
import { CreateLogfileGroupContext } from "./MySqlParser.js";
|
|
18
18
|
import { CreateProcedureContext } from "./MySqlParser.js";
|
|
19
|
+
import { CreateFunctionContext } from "./MySqlParser.js";
|
|
20
|
+
import { CreateFunctionLoadableContext } from "./MySqlParser.js";
|
|
19
21
|
import { CreateRoleContext } from "./MySqlParser.js";
|
|
20
22
|
import { CreateServerContext } from "./MySqlParser.js";
|
|
21
23
|
import { QueryCreateTableContext } from "./MySqlParser.js";
|
|
@@ -40,6 +42,7 @@ import { EnableTypeContext } from "./MySqlParser.js";
|
|
|
40
42
|
import { IndexTypeContext } from "./MySqlParser.js";
|
|
41
43
|
import { IndexOptionContext } from "./MySqlParser.js";
|
|
42
44
|
import { ProcedureParameterContext } from "./MySqlParser.js";
|
|
45
|
+
import { FunctionParameterContext } from "./MySqlParser.js";
|
|
43
46
|
import { RoutineCommentContext } from "./MySqlParser.js";
|
|
44
47
|
import { RoutineLanguageContext } from "./MySqlParser.js";
|
|
45
48
|
import { RoutineBehaviorContext } from "./MySqlParser.js";
|
|
@@ -435,7 +438,6 @@ import { OptimizeTableContext } from "./MySqlParser.js";
|
|
|
435
438
|
import { RepairTableContext } from "./MySqlParser.js";
|
|
436
439
|
import { TableActionOptionContext } from "./MySqlParser.js";
|
|
437
440
|
import { CheckTableOptionContext } from "./MySqlParser.js";
|
|
438
|
-
import { CreateFunctionContext } from "./MySqlParser.js";
|
|
439
441
|
import { InstallComponentContext } from "./MySqlParser.js";
|
|
440
442
|
import { VariableExprContext } from "./MySqlParser.js";
|
|
441
443
|
import { UninstallComponentContext } from "./MySqlParser.js";
|
|
@@ -843,6 +845,26 @@ export declare class MySqlParserListener implements ParseTreeListener {
|
|
|
843
845
|
* @param ctx the parse tree
|
|
844
846
|
*/
|
|
845
847
|
exitCreateProcedure?: (ctx: CreateProcedureContext) => void;
|
|
848
|
+
/**
|
|
849
|
+
* Enter a parse tree produced by `MySqlParser.createFunction`.
|
|
850
|
+
* @param ctx the parse tree
|
|
851
|
+
*/
|
|
852
|
+
enterCreateFunction?: (ctx: CreateFunctionContext) => void;
|
|
853
|
+
/**
|
|
854
|
+
* Exit a parse tree produced by `MySqlParser.createFunction`.
|
|
855
|
+
* @param ctx the parse tree
|
|
856
|
+
*/
|
|
857
|
+
exitCreateFunction?: (ctx: CreateFunctionContext) => void;
|
|
858
|
+
/**
|
|
859
|
+
* Enter a parse tree produced by `MySqlParser.createFunctionLoadable`.
|
|
860
|
+
* @param ctx the parse tree
|
|
861
|
+
*/
|
|
862
|
+
enterCreateFunctionLoadable?: (ctx: CreateFunctionLoadableContext) => void;
|
|
863
|
+
/**
|
|
864
|
+
* Exit a parse tree produced by `MySqlParser.createFunctionLoadable`.
|
|
865
|
+
* @param ctx the parse tree
|
|
866
|
+
*/
|
|
867
|
+
exitCreateFunctionLoadable?: (ctx: CreateFunctionLoadableContext) => void;
|
|
846
868
|
/**
|
|
847
869
|
* Enter a parse tree produced by `MySqlParser.createRole`.
|
|
848
870
|
* @param ctx the parse tree
|
|
@@ -1093,6 +1115,16 @@ export declare class MySqlParserListener implements ParseTreeListener {
|
|
|
1093
1115
|
* @param ctx the parse tree
|
|
1094
1116
|
*/
|
|
1095
1117
|
exitProcedureParameter?: (ctx: ProcedureParameterContext) => void;
|
|
1118
|
+
/**
|
|
1119
|
+
* Enter a parse tree produced by `MySqlParser.functionParameter`.
|
|
1120
|
+
* @param ctx the parse tree
|
|
1121
|
+
*/
|
|
1122
|
+
enterFunctionParameter?: (ctx: FunctionParameterContext) => void;
|
|
1123
|
+
/**
|
|
1124
|
+
* Exit a parse tree produced by `MySqlParser.functionParameter`.
|
|
1125
|
+
* @param ctx the parse tree
|
|
1126
|
+
*/
|
|
1127
|
+
exitFunctionParameter?: (ctx: FunctionParameterContext) => void;
|
|
1096
1128
|
/**
|
|
1097
1129
|
* Enter a parse tree produced by the `routineComment`
|
|
1098
1130
|
* labeled alternative in `MySqlParser.routineOption`.
|
|
@@ -5429,16 +5461,6 @@ export declare class MySqlParserListener implements ParseTreeListener {
|
|
|
5429
5461
|
* @param ctx the parse tree
|
|
5430
5462
|
*/
|
|
5431
5463
|
exitCheckTableOption?: (ctx: CheckTableOptionContext) => void;
|
|
5432
|
-
/**
|
|
5433
|
-
* Enter a parse tree produced by `MySqlParser.createFunction`.
|
|
5434
|
-
* @param ctx the parse tree
|
|
5435
|
-
*/
|
|
5436
|
-
enterCreateFunction?: (ctx: CreateFunctionContext) => void;
|
|
5437
|
-
/**
|
|
5438
|
-
* Exit a parse tree produced by `MySqlParser.createFunction`.
|
|
5439
|
-
* @param ctx the parse tree
|
|
5440
|
-
*/
|
|
5441
|
-
exitCreateFunction?: (ctx: CreateFunctionContext) => void;
|
|
5442
5464
|
/**
|
|
5443
5465
|
* Enter a parse tree produced by `MySqlParser.installComponent`.
|
|
5444
5466
|
* @param ctx the parse tree
|
|
@@ -16,6 +16,8 @@ import { CreateEventContext } from "./MySqlParser.js";
|
|
|
16
16
|
import { CreateIndexContext } from "./MySqlParser.js";
|
|
17
17
|
import { CreateLogfileGroupContext } from "./MySqlParser.js";
|
|
18
18
|
import { CreateProcedureContext } from "./MySqlParser.js";
|
|
19
|
+
import { CreateFunctionContext } from "./MySqlParser.js";
|
|
20
|
+
import { CreateFunctionLoadableContext } from "./MySqlParser.js";
|
|
19
21
|
import { CreateRoleContext } from "./MySqlParser.js";
|
|
20
22
|
import { CreateServerContext } from "./MySqlParser.js";
|
|
21
23
|
import { QueryCreateTableContext } from "./MySqlParser.js";
|
|
@@ -40,6 +42,7 @@ import { EnableTypeContext } from "./MySqlParser.js";
|
|
|
40
42
|
import { IndexTypeContext } from "./MySqlParser.js";
|
|
41
43
|
import { IndexOptionContext } from "./MySqlParser.js";
|
|
42
44
|
import { ProcedureParameterContext } from "./MySqlParser.js";
|
|
45
|
+
import { FunctionParameterContext } from "./MySqlParser.js";
|
|
43
46
|
import { RoutineCommentContext } from "./MySqlParser.js";
|
|
44
47
|
import { RoutineLanguageContext } from "./MySqlParser.js";
|
|
45
48
|
import { RoutineBehaviorContext } from "./MySqlParser.js";
|
|
@@ -435,7 +438,6 @@ import { OptimizeTableContext } from "./MySqlParser.js";
|
|
|
435
438
|
import { RepairTableContext } from "./MySqlParser.js";
|
|
436
439
|
import { TableActionOptionContext } from "./MySqlParser.js";
|
|
437
440
|
import { CheckTableOptionContext } from "./MySqlParser.js";
|
|
438
|
-
import { CreateFunctionContext } from "./MySqlParser.js";
|
|
439
441
|
import { InstallComponentContext } from "./MySqlParser.js";
|
|
440
442
|
import { VariableExprContext } from "./MySqlParser.js";
|
|
441
443
|
import { UninstallComponentContext } from "./MySqlParser.js";
|
|
@@ -778,6 +780,18 @@ export declare class MySqlParserVisitor<Result> extends AbstractParseTreeVisitor
|
|
|
778
780
|
* @return the visitor result
|
|
779
781
|
*/
|
|
780
782
|
visitCreateProcedure?: (ctx: CreateProcedureContext) => Result;
|
|
783
|
+
/**
|
|
784
|
+
* Visit a parse tree produced by `MySqlParser.createFunction`.
|
|
785
|
+
* @param ctx the parse tree
|
|
786
|
+
* @return the visitor result
|
|
787
|
+
*/
|
|
788
|
+
visitCreateFunction?: (ctx: CreateFunctionContext) => Result;
|
|
789
|
+
/**
|
|
790
|
+
* Visit a parse tree produced by `MySqlParser.createFunctionLoadable`.
|
|
791
|
+
* @param ctx the parse tree
|
|
792
|
+
* @return the visitor result
|
|
793
|
+
*/
|
|
794
|
+
visitCreateFunctionLoadable?: (ctx: CreateFunctionLoadableContext) => Result;
|
|
781
795
|
/**
|
|
782
796
|
* Visit a parse tree produced by `MySqlParser.createRole`.
|
|
783
797
|
* @param ctx the parse tree
|
|
@@ -927,6 +941,12 @@ export declare class MySqlParserVisitor<Result> extends AbstractParseTreeVisitor
|
|
|
927
941
|
* @return the visitor result
|
|
928
942
|
*/
|
|
929
943
|
visitProcedureParameter?: (ctx: ProcedureParameterContext) => Result;
|
|
944
|
+
/**
|
|
945
|
+
* Visit a parse tree produced by `MySqlParser.functionParameter`.
|
|
946
|
+
* @param ctx the parse tree
|
|
947
|
+
* @return the visitor result
|
|
948
|
+
*/
|
|
949
|
+
visitFunctionParameter?: (ctx: FunctionParameterContext) => Result;
|
|
930
950
|
/**
|
|
931
951
|
* Visit a parse tree produced by the `routineComment`
|
|
932
952
|
* labeled alternative in `MySqlParser.routineOption`.
|
|
@@ -3490,12 +3510,6 @@ export declare class MySqlParserVisitor<Result> extends AbstractParseTreeVisitor
|
|
|
3490
3510
|
* @return the visitor result
|
|
3491
3511
|
*/
|
|
3492
3512
|
visitCheckTableOption?: (ctx: CheckTableOptionContext) => Result;
|
|
3493
|
-
/**
|
|
3494
|
-
* Visit a parse tree produced by `MySqlParser.createFunction`.
|
|
3495
|
-
* @param ctx the parse tree
|
|
3496
|
-
* @return the visitor result
|
|
3497
|
-
*/
|
|
3498
|
-
visitCreateFunction?: (ctx: CreateFunctionContext) => Result;
|
|
3499
3513
|
/**
|
|
3500
3514
|
* Visit a parse tree produced by `MySqlParser.installComponent`.
|
|
3501
3515
|
* @param ctx the parse tree
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Generated from dt-sql-parser/src/grammar/postgresql/PostgreSqlLexer.g4 by ANTLR 4.13.1
|
|
2
2
|
// @ts-nocheck
|
|
3
3
|
import * as antlr from "antlr4ng";
|
|
4
|
-
class PostgreSqlLexer extends antlr.Lexer {
|
|
4
|
+
export class PostgreSqlLexer extends antlr.Lexer {
|
|
5
5
|
constructor(input) {
|
|
6
6
|
super(input);
|
|
7
7
|
this.interpreter = new antlr.LexerATNSimulator(this, PostgreSqlLexer._ATN, PostgreSqlLexer.decisionsToDFA, new antlr.PredictionContextCache());
|
|
@@ -3217,4 +3217,3 @@ PostgreSqlLexer._serializedATN = [
|
|
|
3217
3217
|
];
|
|
3218
3218
|
PostgreSqlLexer.vocabulary = new antlr.Vocabulary(PostgreSqlLexer.literalNames, PostgreSqlLexer.symbolicNames, []);
|
|
3219
3219
|
PostgreSqlLexer.decisionsToDFA = PostgreSqlLexer._ATN.decisionToState.map((ds, index) => new antlr.DFA(ds, index));
|
|
3220
|
-
export { PostgreSqlLexer };
|