dt-sql-parser 4.0.3-beta.0 → 4.0.3-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/dist/index.d.ts +1 -1
- package/dist/lib/flink/FlinkSqlParser.d.ts +168 -171
- package/dist/lib/flink/FlinkSqlParser.js +2341 -2426
- package/dist/lib/flink/FlinkSqlParserListener.d.ts +0 -11
- package/dist/lib/flink/FlinkSqlParserVisitor.d.ts +0 -7
- package/dist/lib/hive/HiveSqlParser.d.ts +5 -1
- package/dist/lib/hive/HiveSqlParser.js +145 -130
- package/dist/lib/impala/ImpalaSqlParser.d.ts +121 -105
- package/dist/lib/impala/ImpalaSqlParser.js +3303 -3225
- package/dist/lib/impala/ImpalaSqlParserListener.d.ts +22 -0
- package/dist/lib/impala/ImpalaSqlParserVisitor.d.ts +14 -0
- package/dist/lib/mysql/MySqlParser.d.ts +4 -0
- package/dist/lib/mysql/MySqlParser.js +4 -4
- package/dist/lib/postgresql/PostgreSqlParser.d.ts +3 -0
- package/dist/lib/postgresql/PostgreSqlParser.js +1500 -1492
- package/dist/lib/spark/SparkSqlParser.d.ts +16 -13
- package/dist/lib/spark/SparkSqlParser.js +49 -49
- package/dist/lib/spark/SparkSqlParserListener.d.ts +10 -10
- package/dist/lib/spark/SparkSqlParserVisitor.d.ts +6 -6
- package/dist/lib/trino/TrinoSqlParser.d.ts +13 -5
- package/dist/lib/trino/TrinoSqlParser.js +23 -23
- package/dist/locale/locale.d.ts +41 -0
- package/dist/locale/locale.js +43 -0
- package/dist/parser/common/basicSQL.d.ts +7 -2
- package/dist/parser/common/basicSQL.js +5 -5
- package/dist/parser/common/entityCollector.d.ts +58 -11
- package/dist/parser/common/entityCollector.js +140 -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 +3 -0
- package/dist/parser/flink/index.js +4 -0
- 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 +3 -0
- package/dist/parser/hive/index.js +4 -0
- 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 +3 -0
- package/dist/parser/impala/index.js +4 -0
- package/dist/parser/mysql/index.d.ts +3 -0
- package/dist/parser/mysql/index.js +4 -0
- package/dist/parser/mysql/mysqlEntityCollector.d.ts +1 -1
- package/dist/parser/mysql/mysqlEntityCollector.js +34 -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 +3 -0
- package/dist/parser/postgresql/index.js +4 -0
- package/dist/parser/postgresql/postgreEntityCollector.d.ts +3 -1
- package/dist/parser/postgresql/postgreEntityCollector.js +38 -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 +3 -0
- package/dist/parser/spark/index.js +4 -0
- 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 +3 -0
- package/dist/parser/trino/index.js +4 -0
- package/dist/parser/trino/trinoEntityCollector.d.ts +1 -1
- package/dist/parser/trino/trinoEntityCollector.js +34 -5
- package/dist/parser/trino/trinoErrorListener.d.ts +9 -0
- package/dist/parser/trino/trinoErrorListener.js +65 -0
- package/package.json +5 -3
|
@@ -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
|
|
@@ -2668,6 +2668,7 @@ export declare class RoutineLanguageContext extends RoutineOptionContext {
|
|
|
2668
2668
|
accept<Result>(visitor: MySqlParserVisitor<Result>): Result | null;
|
|
2669
2669
|
}
|
|
2670
2670
|
export declare class RoutineCommentContext extends RoutineOptionContext {
|
|
2671
|
+
_comment?: Token | null;
|
|
2671
2672
|
constructor(ctx: RoutineOptionContext);
|
|
2672
2673
|
KW_COMMENT(): antlr.TerminalNode;
|
|
2673
2674
|
STRING_LITERAL(): antlr.TerminalNode;
|
|
@@ -2780,6 +2781,7 @@ export declare class ConstraintSymbolContext extends antlr.ParserRuleContext {
|
|
|
2780
2781
|
accept<Result>(visitor: MySqlParserVisitor<Result>): Result | null;
|
|
2781
2782
|
}
|
|
2782
2783
|
export declare class ColumnDefinitionContext extends antlr.ParserRuleContext {
|
|
2784
|
+
_colType?: DataTypeContext;
|
|
2783
2785
|
constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
|
|
2784
2786
|
dataType(): DataTypeContext;
|
|
2785
2787
|
columnConstraint(): ColumnConstraintContext[];
|
|
@@ -2823,6 +2825,7 @@ export declare class AutoIncrementColumnConstraintContext extends ColumnConstrai
|
|
|
2823
2825
|
accept<Result>(visitor: MySqlParserVisitor<Result>): Result | null;
|
|
2824
2826
|
}
|
|
2825
2827
|
export declare class CommentColumnConstraintContext extends ColumnConstraintContext {
|
|
2828
|
+
_comment?: Token | null;
|
|
2826
2829
|
constructor(ctx: ColumnConstraintContext);
|
|
2827
2830
|
KW_COMMENT(): antlr.TerminalNode;
|
|
2828
2831
|
STRING_LITERAL(): antlr.TerminalNode;
|
|
@@ -3244,6 +3247,7 @@ export declare class TableOptionSecondaryEngineAttributeContext extends TableOpt
|
|
|
3244
3247
|
accept<Result>(visitor: MySqlParserVisitor<Result>): Result | null;
|
|
3245
3248
|
}
|
|
3246
3249
|
export declare class TableOptionCommentContext extends TableOptionContext {
|
|
3250
|
+
_comment?: Token | null;
|
|
3247
3251
|
constructor(ctx: TableOptionContext);
|
|
3248
3252
|
KW_COMMENT(): antlr.TerminalNode;
|
|
3249
3253
|
STRING_LITERAL(): antlr.TerminalNode;
|
|
@@ -4839,7 +4839,7 @@ export class MySqlParser extends SQLParserBase {
|
|
|
4839
4839
|
this.state = 1697;
|
|
4840
4840
|
this.match(MySqlParser.KW_COMMENT);
|
|
4841
4841
|
this.state = 1698;
|
|
4842
|
-
this.match(MySqlParser.STRING_LITERAL);
|
|
4842
|
+
localContext._comment = this.match(MySqlParser.STRING_LITERAL);
|
|
4843
4843
|
}
|
|
4844
4844
|
break;
|
|
4845
4845
|
case MySqlParser.KW_LANGUAGE:
|
|
@@ -5495,7 +5495,7 @@ export class MySqlParser extends SQLParserBase {
|
|
|
5495
5495
|
this.enterOuterAlt(localContext, 1);
|
|
5496
5496
|
{
|
|
5497
5497
|
this.state = 1851;
|
|
5498
|
-
this.dataType();
|
|
5498
|
+
localContext._colType = this.dataType();
|
|
5499
5499
|
this.state = 1855;
|
|
5500
5500
|
this.errorHandler.sync(this);
|
|
5501
5501
|
alternative = this.interpreter.adaptivePredict(this.tokenStream, 172, this.context);
|
|
@@ -5645,7 +5645,7 @@ export class MySqlParser extends SQLParserBase {
|
|
|
5645
5645
|
this.state = 1877;
|
|
5646
5646
|
this.match(MySqlParser.KW_COMMENT);
|
|
5647
5647
|
this.state = 1878;
|
|
5648
|
-
this.match(MySqlParser.STRING_LITERAL);
|
|
5648
|
+
localContext._comment = this.match(MySqlParser.STRING_LITERAL);
|
|
5649
5649
|
}
|
|
5650
5650
|
break;
|
|
5651
5651
|
case MySqlParser.KW_COLUMN_FORMAT:
|
|
@@ -6266,7 +6266,7 @@ export class MySqlParser extends SQLParserBase {
|
|
|
6266
6266
|
}
|
|
6267
6267
|
}
|
|
6268
6268
|
this.state = 1998;
|
|
6269
|
-
this.match(MySqlParser.STRING_LITERAL);
|
|
6269
|
+
localContext._comment = this.match(MySqlParser.STRING_LITERAL);
|
|
6270
6270
|
}
|
|
6271
6271
|
break;
|
|
6272
6272
|
case 10:
|
|
@@ -2737,6 +2737,7 @@ export declare class TypedtableelementContext extends antlr.ParserRuleContext {
|
|
|
2737
2737
|
accept<Result>(visitor: PostgreSqlParserVisitor<Result>): Result | null;
|
|
2738
2738
|
}
|
|
2739
2739
|
export declare class Column_defContext extends antlr.ParserRuleContext {
|
|
2740
|
+
_colType?: TypenameContext;
|
|
2740
2741
|
constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
|
|
2741
2742
|
column_name_create(): Column_name_createContext;
|
|
2742
2743
|
typename(): TypenameContext;
|
|
@@ -6759,6 +6760,7 @@ export declare class Table_refContext extends antlr.ParserRuleContext {
|
|
|
6759
6760
|
accept<Result>(visitor: PostgreSqlParserVisitor<Result>): Result | null;
|
|
6760
6761
|
}
|
|
6761
6762
|
export declare class Alias_clauseContext extends antlr.ParserRuleContext {
|
|
6763
|
+
_alias?: ColidContext;
|
|
6762
6764
|
constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
|
|
6763
6765
|
colid(): ColidContext;
|
|
6764
6766
|
KW_AS(): antlr.TerminalNode | null;
|
|
@@ -6771,6 +6773,7 @@ export declare class Alias_clauseContext extends antlr.ParserRuleContext {
|
|
|
6771
6773
|
accept<Result>(visitor: PostgreSqlParserVisitor<Result>): Result | null;
|
|
6772
6774
|
}
|
|
6773
6775
|
export declare class Func_alias_clauseContext extends antlr.ParserRuleContext {
|
|
6776
|
+
_alias?: ColidContext;
|
|
6774
6777
|
constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
|
|
6775
6778
|
alias_clause(): Alias_clauseContext | null;
|
|
6776
6779
|
OPEN_PAREN(): antlr.TerminalNode | null;
|