dt-sql-parser 4.0.0-ng.2 → 4.0.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 +119 -112
- package/dist/index.d.ts +14 -6
- package/dist/index.js +11 -4
- package/dist/lib/SQLParserBase.d.ts +8 -0
- package/dist/lib/SQLParserBase.js +14 -0
- package/dist/lib/{flinksql → flink}/FlinkSqlLexer.d.ts +2 -2
- package/dist/lib/{flinksql → flink}/FlinkSqlLexer.js +2 -1
- package/dist/lib/{flinksql → flink}/FlinkSqlParser.d.ts +5 -11
- package/dist/lib/{flinksql → flink}/FlinkSqlParser.js +2065 -2054
- package/dist/lib/{flinksql → flink}/FlinkSqlParserListener.d.ts +0 -13
- package/dist/lib/{flinksql → flink}/FlinkSqlParserListener.js +1 -1
- package/dist/lib/{flinksql → flink}/FlinkSqlParserVisitor.d.ts +0 -8
- package/dist/lib/{flinksql → flink}/FlinkSqlParserVisitor.js +2 -1
- package/dist/lib/hive/HiveSqlLexer.d.ts +258 -257
- package/dist/lib/hive/HiveSqlLexer.js +1794 -1786
- package/dist/lib/hive/HiveSqlParser.d.ts +1266 -3176
- package/dist/lib/hive/HiveSqlParser.js +23046 -33454
- package/dist/lib/hive/HiveSqlParserListener.d.ts +141 -2036
- package/dist/lib/hive/HiveSqlParserVisitor.d.ts +151 -1358
- package/dist/lib/hive/HiveSqlParserVisitor.js +1 -0
- package/dist/lib/impala/ImpalaSqlLexer.d.ts +170 -154
- package/dist/lib/impala/ImpalaSqlLexer.js +1179 -1099
- package/dist/lib/impala/ImpalaSqlParser.d.ts +282 -240
- package/dist/lib/impala/ImpalaSqlParser.js +3881 -3744
- package/dist/lib/impala/ImpalaSqlParserListener.d.ts +22 -11
- package/dist/lib/impala/ImpalaSqlParserVisitor.d.ts +14 -7
- package/dist/lib/impala/ImpalaSqlParserVisitor.js +1 -0
- package/dist/lib/index.d.ts +6 -6
- package/dist/lib/index.js +6 -6
- package/dist/lib/mysql/MySqlLexer.d.ts +2 -2
- package/dist/lib/mysql/MySqlLexer.js +1 -0
- package/dist/lib/mysql/MySqlParser.d.ts +347 -418
- package/dist/lib/mysql/MySqlParser.js +10484 -11099
- package/dist/lib/mysql/MySqlParserListener.d.ts +41 -126
- package/dist/lib/mysql/MySqlParserVisitor.d.ts +23 -76
- package/dist/lib/mysql/MySqlParserVisitor.js +1 -0
- package/dist/lib/plsql/PlSqlBaseLexer.d.ts +1 -2
- package/dist/lib/plsql/PlSqlBaseLexer.js +1 -1
- package/dist/lib/plsql/PlSqlBaseParser.d.ts +3 -2
- package/dist/lib/plsql/PlSqlBaseParser.js +2 -2
- package/dist/lib/plsql/PlSqlLexer.d.ts +3 -3
- package/dist/lib/plsql/PlSqlLexer.js +2 -1
- package/dist/lib/plsql/PlSqlParser.d.ts +3 -3
- package/dist/lib/plsql/PlSqlParser.js +2 -1
- package/dist/lib/plsql/PlSqlParserVisitor.js +1 -0
- package/dist/lib/{pgsql/PostgreSQLLexer.d.ts → postgresql/PostgreSqlLexer.d.ts} +3 -3
- package/dist/lib/{pgsql/PostgreSQLLexer.js → postgresql/PostgreSqlLexer.js} +618 -617
- package/dist/lib/{pgsql/PostgreSQLParser.d.ts → postgresql/PostgreSqlParser.d.ts} +3598 -3484
- package/dist/lib/{pgsql/PostgreSQLParser.js → postgresql/PostgreSqlParser.js} +41502 -42831
- package/dist/lib/{pgsql/PostgreSQLParserListener.d.ts → postgresql/PostgreSqlParserListener.d.ts} +2797 -2730
- package/dist/lib/{pgsql/PostgreSQLParserListener.js → postgresql/PostgreSqlParserListener.js} +3 -3
- package/dist/lib/{pgsql/PostgreSQLParserVisitor.d.ts → postgresql/PostgreSqlParserVisitor.d.ts} +1845 -1810
- package/dist/lib/{pgsql/PostgreSQLParserVisitor.js → postgresql/PostgreSqlParserVisitor.js} +4 -3
- package/dist/lib/spark/SparkSqlLexer.d.ts +305 -298
- package/dist/lib/spark/SparkSqlLexer.js +1777 -1735
- package/dist/lib/spark/SparkSqlParser.d.ts +1764 -669
- package/dist/lib/spark/SparkSqlParser.js +15460 -10769
- package/dist/lib/spark/SparkSqlParserListener.d.ts +1285 -35
- package/dist/lib/spark/SparkSqlParserVisitor.d.ts +790 -21
- package/dist/lib/spark/SparkSqlParserVisitor.js +1 -0
- package/dist/lib/{trinosql → trino}/TrinoSqlLexer.d.ts +2 -2
- package/dist/lib/{trinosql → trino}/TrinoSqlLexer.js +2 -1
- package/dist/lib/{trinosql → trino}/TrinoSqlListener.d.ts +7 -5
- package/dist/lib/{trinosql → trino}/TrinoSqlListener.js +1 -1
- package/dist/lib/{trinosql → trino}/TrinoSqlParser.d.ts +11 -5
- package/dist/lib/{trinosql → trino}/TrinoSqlParser.js +360 -320
- package/dist/lib/{trinosql → trino}/TrinoSqlVisitor.d.ts +4 -3
- package/dist/lib/{trinosql → trino}/TrinoSqlVisitor.js +2 -1
- package/dist/parser/common/{basicParser.d.ts → basicSQL.d.ts} +22 -19
- package/dist/parser/common/{basicParser.js → basicSQL.js} +52 -34
- package/dist/parser/common/entityCollector.d.ts +78 -0
- package/dist/parser/common/entityCollector.js +191 -0
- package/dist/parser/common/{utils/findCaretTokenIndex.d.ts → findCaretTokenIndex.d.ts} +2 -2
- package/dist/parser/common/{utils/findCaretTokenIndex.js → findCaretTokenIndex.js} +3 -2
- package/dist/parser/common/parseErrorListener.d.ts +6 -6
- package/dist/parser/common/parseErrorListener.js +1 -1
- package/dist/parser/common/simpleStack.d.ts +10 -0
- package/dist/parser/common/simpleStack.js +23 -0
- package/dist/parser/common/splitListener.d.ts +8 -0
- package/dist/parser/common/splitListener.js +12 -0
- package/dist/parser/common/textAndWord.d.ts +52 -0
- package/dist/parser/common/textAndWord.js +58 -0
- package/dist/parser/common/{basic-parser-types.d.ts → types.d.ts} +4 -31
- package/dist/parser/common/types.js +34 -0
- package/dist/parser/flink/flinkEntityCollector.d.ts +33 -0
- package/dist/parser/flink/flinkEntityCollector.js +84 -0
- package/dist/parser/flink/flinkSplitListener.d.ts +6 -0
- package/dist/parser/flink/flinkSplitListener.js +6 -0
- package/dist/parser/flink/index.d.ts +17 -0
- package/dist/parser/{flinksql.js → flink/index.js} +26 -37
- package/dist/parser/hive/hiveEntityCollector.d.ts +35 -0
- package/dist/parser/hive/hiveEntityCollector.js +90 -0
- package/dist/parser/hive/hiveSplitListener.d.ts +6 -0
- package/dist/parser/hive/hiveSplitListener.js +6 -0
- package/dist/parser/hive/index.d.ts +17 -0
- package/dist/parser/{hive.js → hive/index.js} +24 -34
- package/dist/parser/impala/impalaEntityCollector.d.ts +35 -0
- package/dist/parser/impala/impalaEntityCollector.js +90 -0
- package/dist/parser/impala/impalaSplitListener.d.ts +6 -0
- package/dist/parser/impala/impalaSplitListener.js +6 -0
- package/dist/parser/impala/index.d.ts +17 -0
- package/dist/parser/{impala.js → impala/index.js} +24 -34
- package/dist/parser/index.d.ts +8 -8
- package/dist/parser/index.js +8 -8
- package/dist/parser/mysql/index.d.ts +17 -0
- package/dist/parser/{mysql.js → mysql/index.js} +24 -34
- package/dist/parser/mysql/mysqlEntityCollector.d.ts +37 -0
- package/dist/parser/mysql/mysqlEntityCollector.js +96 -0
- package/dist/parser/mysql/mysqlSplitListener.d.ts +6 -0
- package/dist/parser/mysql/mysqlSplitListener.js +6 -0
- package/dist/parser/plsql.d.ts +7 -6
- package/dist/parser/plsql.js +6 -4
- package/dist/parser/postgresql/index.d.ts +17 -0
- package/dist/parser/postgresql/index.js +130 -0
- package/dist/parser/postgresql/postgreEntityCollector.d.ts +37 -0
- package/dist/parser/postgresql/postgreEntityCollector.js +96 -0
- package/dist/parser/postgresql/postgreSplitListener.d.ts +6 -0
- package/dist/parser/postgresql/postgreSplitListener.js +6 -0
- package/dist/parser/spark/index.d.ts +17 -0
- package/dist/parser/{spark.js → spark/index.js} +29 -40
- package/dist/parser/spark/sparkEntityCollector.d.ts +37 -0
- package/dist/parser/spark/sparkEntityCollector.js +96 -0
- package/dist/parser/spark/sparkSplitListener.d.ts +6 -0
- package/dist/parser/spark/sparkSplitListener.js +6 -0
- package/dist/parser/trino/index.d.ts +17 -0
- package/dist/parser/{trinosql.js → trino/index.js} +25 -36
- package/dist/parser/trino/trinoEntityCollector.d.ts +30 -0
- package/dist/parser/trino/trinoEntityCollector.js +75 -0
- package/dist/parser/trino/trinoSplitListener.d.ts +6 -0
- package/dist/parser/trino/trinoSplitListener.js +6 -0
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/token.d.ts +1 -1
- package/package.json +1 -1
- package/dist/parser/common/basic-parser-types.js +0 -34
- package/dist/parser/flinksql.d.ts +0 -23
- package/dist/parser/hive.d.ts +0 -23
- package/dist/parser/impala.d.ts +0 -23
- package/dist/parser/mysql.d.ts +0 -23
- package/dist/parser/pgsql.d.ts +0 -23
- package/dist/parser/pgsql.js +0 -140
- package/dist/parser/spark.d.ts +0 -23
- package/dist/parser/trinosql.d.ts +0 -23
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export class SimpleStack {
|
|
2
|
+
constructor() {
|
|
3
|
+
this.stack = [];
|
|
4
|
+
}
|
|
5
|
+
push(item) {
|
|
6
|
+
this.stack.push(item);
|
|
7
|
+
}
|
|
8
|
+
pop() {
|
|
9
|
+
return this.stack.pop();
|
|
10
|
+
}
|
|
11
|
+
peek() {
|
|
12
|
+
return this.stack[this.stack.length - 1];
|
|
13
|
+
}
|
|
14
|
+
clear() {
|
|
15
|
+
this.stack = [];
|
|
16
|
+
}
|
|
17
|
+
size() {
|
|
18
|
+
return this.stack.length;
|
|
19
|
+
}
|
|
20
|
+
isEmpty() {
|
|
21
|
+
return this.stack.length === 0;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { ParserRuleContext, Token } from 'antlr4ng';
|
|
2
|
+
export interface WordPosition {
|
|
3
|
+
/** start at 0 */
|
|
4
|
+
readonly startIndex: number;
|
|
5
|
+
/** end at ..n-1 */
|
|
6
|
+
readonly endIndex: number;
|
|
7
|
+
/** start at 1 */
|
|
8
|
+
readonly line: number;
|
|
9
|
+
/** start at 1 */
|
|
10
|
+
readonly startColumn: number;
|
|
11
|
+
/** end at ..n + 1 */
|
|
12
|
+
readonly endColumn: number;
|
|
13
|
+
}
|
|
14
|
+
export interface WordRange extends WordPosition {
|
|
15
|
+
/** content of word */
|
|
16
|
+
readonly text: string;
|
|
17
|
+
}
|
|
18
|
+
export interface TextPosition {
|
|
19
|
+
/** start at 0 */
|
|
20
|
+
readonly startIndex: number;
|
|
21
|
+
/** end at ..n-1 */
|
|
22
|
+
readonly endIndex: number;
|
|
23
|
+
/** start at 1 */
|
|
24
|
+
readonly startLine: number;
|
|
25
|
+
/** end at ..n */
|
|
26
|
+
readonly endLine: number;
|
|
27
|
+
/** start at 1 */
|
|
28
|
+
readonly startColumn: number;
|
|
29
|
+
/** end at ..n + 1 */
|
|
30
|
+
readonly endColumn: number;
|
|
31
|
+
}
|
|
32
|
+
export interface TextSlice extends TextPosition {
|
|
33
|
+
readonly text: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Convert Token to Word
|
|
37
|
+
*/
|
|
38
|
+
export declare function tokenToWord(token: Token, input: string): WordPosition & {
|
|
39
|
+
text: string;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Convert ParserRuleContext to Word
|
|
43
|
+
*/
|
|
44
|
+
export declare function ctxToWord(ctx: ParserRuleContext, input: string): (WordPosition & {
|
|
45
|
+
text: string;
|
|
46
|
+
}) | null;
|
|
47
|
+
/**
|
|
48
|
+
* Convert ParserRuleContext to Text
|
|
49
|
+
*/
|
|
50
|
+
export declare function ctxToText(ctx: ParserRuleContext, input: string): (TextPosition & {
|
|
51
|
+
text: string;
|
|
52
|
+
}) | null;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Convert Token to Word
|
|
3
|
+
*/
|
|
4
|
+
export function tokenToWord(token, input) {
|
|
5
|
+
var _a;
|
|
6
|
+
const startIndex = token.start;
|
|
7
|
+
const endIndex = token.stop;
|
|
8
|
+
const text = (_a = token.text) !== null && _a !== void 0 ? _a : '';
|
|
9
|
+
return {
|
|
10
|
+
text,
|
|
11
|
+
line: token.line,
|
|
12
|
+
startIndex,
|
|
13
|
+
endIndex,
|
|
14
|
+
startColumn: token.column + 1,
|
|
15
|
+
endColumn: token.column + 1 + text.length,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Convert ParserRuleContext to Word
|
|
20
|
+
*/
|
|
21
|
+
export function ctxToWord(ctx, input) {
|
|
22
|
+
var _a, _b;
|
|
23
|
+
if (!ctx.start || !ctx.stop) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
const startIndex = ctx.start.start;
|
|
27
|
+
const endIndex = ctx.stop.stop;
|
|
28
|
+
const text = input.slice(startIndex, endIndex + 1);
|
|
29
|
+
return {
|
|
30
|
+
text,
|
|
31
|
+
line: ctx.start.line,
|
|
32
|
+
startIndex,
|
|
33
|
+
endIndex,
|
|
34
|
+
startColumn: ctx.start.column + 1,
|
|
35
|
+
endColumn: ctx.stop.column + 1 + ((_b = (_a = ctx.stop.text) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0),
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Convert ParserRuleContext to Text
|
|
40
|
+
*/
|
|
41
|
+
export function ctxToText(ctx, input) {
|
|
42
|
+
var _a, _b;
|
|
43
|
+
if (!ctx.start || !ctx.stop) {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
const startIndex = ctx.start.start;
|
|
47
|
+
const endIndex = ctx.stop.stop;
|
|
48
|
+
const text = input.slice(startIndex, endIndex + 1);
|
|
49
|
+
return {
|
|
50
|
+
text,
|
|
51
|
+
startLine: ctx.start.line,
|
|
52
|
+
endLine: ctx.stop.line,
|
|
53
|
+
startIndex,
|
|
54
|
+
endIndex,
|
|
55
|
+
startColumn: ctx.start.column + 1,
|
|
56
|
+
endColumn: ctx.stop.column + 1 + ((_b = (_a = ctx.stop.text) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0),
|
|
57
|
+
};
|
|
58
|
+
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { WordRange } from './textAndWord';
|
|
2
|
+
import { StmtContextType } from './entityCollector';
|
|
1
3
|
/**
|
|
2
4
|
* The insertion position of the candidate list.
|
|
3
5
|
* Such as cursor position
|
|
@@ -11,7 +13,7 @@ export interface CaretPosition {
|
|
|
11
13
|
/**
|
|
12
14
|
* Syntax context type at caret position
|
|
13
15
|
*/
|
|
14
|
-
export declare enum
|
|
16
|
+
export declare enum EntityContextType {
|
|
15
17
|
/** catalog name */
|
|
16
18
|
CATALOG = "catalog",
|
|
17
19
|
/** catalog name that will be created */
|
|
@@ -41,25 +43,11 @@ export declare enum SyntaxContextType {
|
|
|
41
43
|
/** column name that will be created */
|
|
42
44
|
COLUMN_CREATE = "columnCreate"
|
|
43
45
|
}
|
|
44
|
-
export interface WordRange {
|
|
45
|
-
/** content of word */
|
|
46
|
-
readonly text: string;
|
|
47
|
-
/** start at 0 */
|
|
48
|
-
readonly startIndex: number;
|
|
49
|
-
/** end at ..n-1 */
|
|
50
|
-
readonly endIndex: number;
|
|
51
|
-
/** start at 1 */
|
|
52
|
-
readonly line: number;
|
|
53
|
-
/** start at 1 */
|
|
54
|
-
readonly startColumn: number;
|
|
55
|
-
/** end at ..n + 1 */
|
|
56
|
-
readonly stopColumn: number;
|
|
57
|
-
}
|
|
58
46
|
/**
|
|
59
47
|
* Suggested information analyzed from the input
|
|
60
48
|
*/
|
|
61
49
|
export interface SyntaxSuggestion<T = WordRange> {
|
|
62
|
-
readonly syntaxContextType:
|
|
50
|
+
readonly syntaxContextType: EntityContextType | StmtContextType;
|
|
63
51
|
readonly wordRanges: T[];
|
|
64
52
|
}
|
|
65
53
|
/**
|
|
@@ -75,18 +63,3 @@ export interface Suggestions<T = WordRange> {
|
|
|
75
63
|
*/
|
|
76
64
|
readonly keywords: string[];
|
|
77
65
|
}
|
|
78
|
-
export interface TextSlice {
|
|
79
|
-
/** start at 0 */
|
|
80
|
-
readonly startIndex: number;
|
|
81
|
-
/** end at ..n-1 */
|
|
82
|
-
readonly endIndex: number;
|
|
83
|
-
/** start at 1 */
|
|
84
|
-
readonly startLine: number;
|
|
85
|
-
/** end at ..n */
|
|
86
|
-
readonly endLine: number;
|
|
87
|
-
/** start at 1 */
|
|
88
|
-
readonly startColumn: number;
|
|
89
|
-
/** end at ..n + 1 */
|
|
90
|
-
readonly endColumn: number;
|
|
91
|
-
readonly text: string;
|
|
92
|
-
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Syntax context type at caret position
|
|
3
|
+
*/
|
|
4
|
+
export var EntityContextType;
|
|
5
|
+
(function (EntityContextType) {
|
|
6
|
+
/** catalog name */
|
|
7
|
+
EntityContextType["CATALOG"] = "catalog";
|
|
8
|
+
/** catalog name that will be created */
|
|
9
|
+
EntityContextType["CATALOG_CREATE"] = "catalogCreate";
|
|
10
|
+
/** database name path, such as catalog.db */
|
|
11
|
+
EntityContextType["DATABASE"] = "database";
|
|
12
|
+
/** database name path that will be created */
|
|
13
|
+
EntityContextType["DATABASE_CREATE"] = "databaseCreate";
|
|
14
|
+
/** table name path, such as catalog.db.tb */
|
|
15
|
+
EntityContextType["TABLE"] = "table";
|
|
16
|
+
/** table name path that will be created */
|
|
17
|
+
EntityContextType["TABLE_CREATE"] = "tableCreate";
|
|
18
|
+
/** view name path, such as db.tb.view */
|
|
19
|
+
EntityContextType["VIEW"] = "view";
|
|
20
|
+
/** view name path that will be created */
|
|
21
|
+
EntityContextType["VIEW_CREATE"] = "viewCreate";
|
|
22
|
+
/** function name */
|
|
23
|
+
EntityContextType["FUNCTION"] = "function";
|
|
24
|
+
/** function name that will be created */
|
|
25
|
+
EntityContextType["FUNCTION_CREATE"] = "functionCreate";
|
|
26
|
+
/** procedure name */
|
|
27
|
+
EntityContextType["PROCEDURE"] = "procedure";
|
|
28
|
+
/** procedure name that will be created */
|
|
29
|
+
EntityContextType["PROCEDURE_CREATE"] = "procedureCreate";
|
|
30
|
+
/** column name */
|
|
31
|
+
EntityContextType["COLUMN"] = "column";
|
|
32
|
+
/** column name that will be created */
|
|
33
|
+
EntityContextType["COLUMN_CREATE"] = "columnCreate";
|
|
34
|
+
})(EntityContextType || (EntityContextType = {}));
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { CatalogPathContext, CatalogPathCreateContext, ColumnNameCreateContext, CreateCatalogContext, CreateDatabaseContext, CreateFunctionContext, CreateTableContext, CreateViewContext, DatabasePathContext, DatabasePathCreateContext, FunctionNameCreateContext, InsertStatementContext, QueryStatementContext, SqlStatementContext, TablePathContext, TablePathCreateContext, ViewPathContext, ViewPathCreateContext } from '../../lib/flink/FlinkSqlParser';
|
|
2
|
+
import { FlinkSqlParserListener } from '../../lib/flink/FlinkSqlParserListener';
|
|
3
|
+
import { EntityCollector } from '../common/entityCollector';
|
|
4
|
+
export declare class FlinkEntityCollector extends EntityCollector implements FlinkSqlParserListener {
|
|
5
|
+
/** ====== Entity Begin */
|
|
6
|
+
exitCatalogPathCreate(ctx: CatalogPathCreateContext): void;
|
|
7
|
+
exitCatalogPath(ctx: CatalogPathContext): void;
|
|
8
|
+
exitDatabasePathCreate(ctx: DatabasePathCreateContext): void;
|
|
9
|
+
exitDatabasePath(ctx: DatabasePathContext): void;
|
|
10
|
+
exitTablePath(ctx: TablePathContext): void;
|
|
11
|
+
exitTablePathCreate(ctx: TablePathCreateContext): void;
|
|
12
|
+
exitViewPath(ctx: ViewPathContext): void;
|
|
13
|
+
exitViewPathCreate(ctx: ViewPathCreateContext): void;
|
|
14
|
+
exitColumnNameCreate(ctx: ColumnNameCreateContext): void;
|
|
15
|
+
exitFunctionNameCreate(ctx: FunctionNameCreateContext): void;
|
|
16
|
+
/** ===== Statement begin */
|
|
17
|
+
enterSqlStatement(ctx: SqlStatementContext): void;
|
|
18
|
+
exitSqlStatement(ctx: SqlStatementContext): void;
|
|
19
|
+
enterCreateCatalog(ctx: CreateCatalogContext): void;
|
|
20
|
+
exitCreateCatalog(ctx: CreateCatalogContext): void;
|
|
21
|
+
enterCreateDatabase(ctx: CreateDatabaseContext): void;
|
|
22
|
+
exitCreateDatabase(ctx: CreateDatabaseContext): void;
|
|
23
|
+
enterCreateTable(ctx: CreateTableContext): void;
|
|
24
|
+
exitCreateTable(ctx: CreateTableContext): void;
|
|
25
|
+
enterCreateView(ctx: CreateViewContext): void;
|
|
26
|
+
exitCreateView(ctx: CreateViewContext): void;
|
|
27
|
+
enterQueryStatement(ctx: QueryStatementContext): void;
|
|
28
|
+
exitQueryStatement(ctx: QueryStatementContext): void;
|
|
29
|
+
enterCreateFunction(ctx: CreateFunctionContext): void;
|
|
30
|
+
exitCreateFunction(ctx: CreateFunctionContext): void;
|
|
31
|
+
enterInsertStatement(ctx: InsertStatementContext): void;
|
|
32
|
+
exitInsertStatement(ctx: InsertStatementContext): void;
|
|
33
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { EntityContextType } from '../common/types';
|
|
2
|
+
import { StmtContextType, EntityCollector } from '../common/entityCollector';
|
|
3
|
+
export class FlinkEntityCollector extends EntityCollector {
|
|
4
|
+
/** ====== Entity Begin */
|
|
5
|
+
exitCatalogPathCreate(ctx) {
|
|
6
|
+
this.pushEntity(ctx, EntityContextType.CATALOG_CREATE);
|
|
7
|
+
}
|
|
8
|
+
exitCatalogPath(ctx) {
|
|
9
|
+
this.pushEntity(ctx, EntityContextType.CATALOG);
|
|
10
|
+
}
|
|
11
|
+
exitDatabasePathCreate(ctx) {
|
|
12
|
+
this.pushEntity(ctx, EntityContextType.DATABASE_CREATE);
|
|
13
|
+
}
|
|
14
|
+
exitDatabasePath(ctx) {
|
|
15
|
+
this.pushEntity(ctx, EntityContextType.DATABASE);
|
|
16
|
+
}
|
|
17
|
+
exitTablePath(ctx) {
|
|
18
|
+
this.pushEntity(ctx, EntityContextType.TABLE);
|
|
19
|
+
}
|
|
20
|
+
exitTablePathCreate(ctx) {
|
|
21
|
+
this.pushEntity(ctx, EntityContextType.TABLE_CREATE);
|
|
22
|
+
}
|
|
23
|
+
exitViewPath(ctx) {
|
|
24
|
+
this.pushEntity(ctx, EntityContextType.VIEW);
|
|
25
|
+
}
|
|
26
|
+
exitViewPathCreate(ctx) {
|
|
27
|
+
this.pushEntity(ctx, EntityContextType.VIEW_CREATE);
|
|
28
|
+
}
|
|
29
|
+
exitColumnNameCreate(ctx) {
|
|
30
|
+
this.pushEntity(ctx, EntityContextType.COLUMN_CREATE);
|
|
31
|
+
}
|
|
32
|
+
exitFunctionNameCreate(ctx) {
|
|
33
|
+
this.pushEntity(ctx, EntityContextType.FUNCTION_CREATE);
|
|
34
|
+
}
|
|
35
|
+
/** ===== Statement begin */
|
|
36
|
+
enterSqlStatement(ctx) {
|
|
37
|
+
this.pushStmt(ctx, StmtContextType.COMMON_STMT);
|
|
38
|
+
}
|
|
39
|
+
exitSqlStatement(ctx) {
|
|
40
|
+
this.popStmt();
|
|
41
|
+
}
|
|
42
|
+
enterCreateCatalog(ctx) {
|
|
43
|
+
this.pushStmt(ctx, StmtContextType.CREATE_CATALOG_STMT);
|
|
44
|
+
}
|
|
45
|
+
exitCreateCatalog(ctx) {
|
|
46
|
+
this.popStmt();
|
|
47
|
+
}
|
|
48
|
+
enterCreateDatabase(ctx) {
|
|
49
|
+
this.pushStmt(ctx, StmtContextType.CREATE_DATABASE_STMT);
|
|
50
|
+
}
|
|
51
|
+
exitCreateDatabase(ctx) {
|
|
52
|
+
this.popStmt();
|
|
53
|
+
}
|
|
54
|
+
enterCreateTable(ctx) {
|
|
55
|
+
this.pushStmt(ctx, StmtContextType.CREATE_TABLE_STMT);
|
|
56
|
+
}
|
|
57
|
+
exitCreateTable(ctx) {
|
|
58
|
+
this.popStmt();
|
|
59
|
+
}
|
|
60
|
+
enterCreateView(ctx) {
|
|
61
|
+
this.pushStmt(ctx, StmtContextType.CREATE_VIEW_STMT);
|
|
62
|
+
}
|
|
63
|
+
exitCreateView(ctx) {
|
|
64
|
+
this.popStmt();
|
|
65
|
+
}
|
|
66
|
+
enterQueryStatement(ctx) {
|
|
67
|
+
this.pushStmt(ctx, StmtContextType.SELECT_STMT);
|
|
68
|
+
}
|
|
69
|
+
exitQueryStatement(ctx) {
|
|
70
|
+
this.popStmt();
|
|
71
|
+
}
|
|
72
|
+
enterCreateFunction(ctx) {
|
|
73
|
+
this.pushStmt(ctx, StmtContextType.CREATE_FUNCTION_STMT);
|
|
74
|
+
}
|
|
75
|
+
exitCreateFunction(ctx) {
|
|
76
|
+
this.popStmt();
|
|
77
|
+
}
|
|
78
|
+
enterInsertStatement(ctx) {
|
|
79
|
+
this.pushStmt(ctx, StmtContextType.INSERT_STMT);
|
|
80
|
+
}
|
|
81
|
+
exitInsertStatement(ctx) {
|
|
82
|
+
this.popStmt();
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SingleStatementContext } from '../../lib/flink/FlinkSqlParser';
|
|
2
|
+
import { FlinkSqlParserListener } from '../../lib/flink/FlinkSqlParserListener';
|
|
3
|
+
import { SplitListener } from '../common/splitListener';
|
|
4
|
+
export declare class FlinkSqlSplitListener extends SplitListener<SingleStatementContext> implements FlinkSqlParserListener {
|
|
5
|
+
exitSingleStatement(ctx: SingleStatementContext): void;
|
|
6
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CharStream, CommonTokenStream, Token } from 'antlr4ng';
|
|
2
|
+
import { CandidatesCollection } from 'antlr4-c3';
|
|
3
|
+
import { FlinkSqlLexer } from '../../lib/flink/FlinkSqlLexer';
|
|
4
|
+
import { FlinkSqlParser, ProgramContext } from '../../lib/flink/FlinkSqlParser';
|
|
5
|
+
import { Suggestions } from '../common/types';
|
|
6
|
+
import { BasicSQL } from '../common/basicSQL';
|
|
7
|
+
import { FlinkSqlSplitListener } from './flinkSplitListener';
|
|
8
|
+
import { FlinkEntityCollector } from './flinkEntityCollector';
|
|
9
|
+
export { FlinkSqlSplitListener, FlinkEntityCollector };
|
|
10
|
+
export declare class FlinkSQL extends BasicSQL<FlinkSqlLexer, ProgramContext, FlinkSqlParser> {
|
|
11
|
+
protected createLexerFromCharStream(charStreams: CharStream): FlinkSqlLexer;
|
|
12
|
+
protected createParserFromTokenStream(tokenStream: CommonTokenStream): FlinkSqlParser;
|
|
13
|
+
protected preferredRules: Set<number>;
|
|
14
|
+
protected get splitListener(): FlinkSqlSplitListener;
|
|
15
|
+
protected createEntityCollector(input: string, caretTokenIndex?: number): FlinkEntityCollector;
|
|
16
|
+
protected processCandidates(candidates: CandidatesCollection, allTokens: Token[], caretTokenIndex: number, tokenIndexOffset: number): Suggestions<Token>;
|
|
17
|
+
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { FlinkSqlLexer } from '
|
|
2
|
-
import { FlinkSqlParser
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
1
|
+
import { FlinkSqlLexer } from '../../lib/flink/FlinkSqlLexer';
|
|
2
|
+
import { FlinkSqlParser } from '../../lib/flink/FlinkSqlParser';
|
|
3
|
+
import { EntityContextType } from '../common/types';
|
|
4
|
+
import { BasicSQL } from '../common/basicSQL';
|
|
5
|
+
import { FlinkSqlSplitListener } from './flinkSplitListener';
|
|
6
|
+
import { FlinkEntityCollector } from './flinkEntityCollector';
|
|
7
|
+
export { FlinkSqlSplitListener, FlinkEntityCollector };
|
|
8
|
+
export class FlinkSQL extends BasicSQL {
|
|
6
9
|
constructor() {
|
|
7
10
|
super(...arguments);
|
|
8
11
|
this.preferredRules = new Set([
|
|
@@ -20,16 +23,17 @@ export default class FlinkSQL extends BasicParser {
|
|
|
20
23
|
]);
|
|
21
24
|
}
|
|
22
25
|
createLexerFromCharStream(charStreams) {
|
|
23
|
-
|
|
24
|
-
return lexer;
|
|
26
|
+
return new FlinkSqlLexer(charStreams);
|
|
25
27
|
}
|
|
26
28
|
createParserFromTokenStream(tokenStream) {
|
|
27
|
-
|
|
28
|
-
return parser;
|
|
29
|
+
return new FlinkSqlParser(tokenStream);
|
|
29
30
|
}
|
|
30
31
|
get splitListener() {
|
|
31
32
|
return new FlinkSqlSplitListener();
|
|
32
33
|
}
|
|
34
|
+
createEntityCollector(input, caretTokenIndex) {
|
|
35
|
+
return new FlinkEntityCollector(input, caretTokenIndex);
|
|
36
|
+
}
|
|
33
37
|
processCandidates(candidates, allTokens, caretTokenIndex, tokenIndexOffset) {
|
|
34
38
|
const originalSyntaxSuggestions = [];
|
|
35
39
|
const keywords = [];
|
|
@@ -37,50 +41,50 @@ export default class FlinkSQL extends BasicParser {
|
|
|
37
41
|
const [ruleType, candidateRule] = candidate;
|
|
38
42
|
const startTokenIndex = candidateRule.startTokenIndex + tokenIndexOffset;
|
|
39
43
|
const tokenRanges = allTokens.slice(startTokenIndex, caretTokenIndex + tokenIndexOffset + 1);
|
|
40
|
-
let syntaxContextType;
|
|
44
|
+
let syntaxContextType = void 0;
|
|
41
45
|
switch (ruleType) {
|
|
42
46
|
case FlinkSqlParser.RULE_catalogPath: {
|
|
43
|
-
syntaxContextType =
|
|
47
|
+
syntaxContextType = EntityContextType.CATALOG;
|
|
44
48
|
break;
|
|
45
49
|
}
|
|
46
50
|
case FlinkSqlParser.RULE_databasePath: {
|
|
47
|
-
syntaxContextType =
|
|
51
|
+
syntaxContextType = EntityContextType.DATABASE;
|
|
48
52
|
break;
|
|
49
53
|
}
|
|
50
54
|
case FlinkSqlParser.RULE_databasePathCreate: {
|
|
51
|
-
syntaxContextType =
|
|
55
|
+
syntaxContextType = EntityContextType.DATABASE_CREATE;
|
|
52
56
|
break;
|
|
53
57
|
}
|
|
54
58
|
case FlinkSqlParser.RULE_tablePath: {
|
|
55
|
-
syntaxContextType =
|
|
59
|
+
syntaxContextType = EntityContextType.TABLE;
|
|
56
60
|
break;
|
|
57
61
|
}
|
|
58
62
|
case FlinkSqlParser.RULE_tablePathCreate: {
|
|
59
|
-
syntaxContextType =
|
|
63
|
+
syntaxContextType = EntityContextType.TABLE_CREATE;
|
|
60
64
|
break;
|
|
61
65
|
}
|
|
62
66
|
case FlinkSqlParser.RULE_viewPath: {
|
|
63
|
-
syntaxContextType =
|
|
67
|
+
syntaxContextType = EntityContextType.VIEW;
|
|
64
68
|
break;
|
|
65
69
|
}
|
|
66
70
|
case FlinkSqlParser.RULE_viewPathCreate: {
|
|
67
|
-
syntaxContextType =
|
|
71
|
+
syntaxContextType = EntityContextType.VIEW_CREATE;
|
|
68
72
|
break;
|
|
69
73
|
}
|
|
70
74
|
case FlinkSqlParser.RULE_functionName: {
|
|
71
|
-
syntaxContextType =
|
|
75
|
+
syntaxContextType = EntityContextType.FUNCTION;
|
|
72
76
|
break;
|
|
73
77
|
}
|
|
74
78
|
case FlinkSqlParser.RULE_functionNameCreate: {
|
|
75
|
-
syntaxContextType =
|
|
79
|
+
syntaxContextType = EntityContextType.FUNCTION_CREATE;
|
|
76
80
|
break;
|
|
77
81
|
}
|
|
78
82
|
case FlinkSqlParser.RULE_columnName: {
|
|
79
|
-
syntaxContextType =
|
|
83
|
+
syntaxContextType = EntityContextType.COLUMN;
|
|
80
84
|
break;
|
|
81
85
|
}
|
|
82
86
|
case FlinkSqlParser.RULE_columnNameCreate: {
|
|
83
|
-
syntaxContextType =
|
|
87
|
+
syntaxContextType = EntityContextType.COLUMN_CREATE;
|
|
84
88
|
break;
|
|
85
89
|
}
|
|
86
90
|
default:
|
|
@@ -96,7 +100,7 @@ export default class FlinkSQL extends BasicParser {
|
|
|
96
100
|
for (let candidate of candidates.tokens) {
|
|
97
101
|
const symbolicName = this._parser.vocabulary.getSymbolicName(candidate[0]);
|
|
98
102
|
const displayName = this._parser.vocabulary.getDisplayName(candidate[0]);
|
|
99
|
-
if (symbolicName && symbolicName.startsWith('KW_')) {
|
|
103
|
+
if (displayName && symbolicName && symbolicName.startsWith('KW_')) {
|
|
100
104
|
const keyword = displayName.startsWith("'") && displayName.endsWith("'")
|
|
101
105
|
? displayName.slice(1, -1)
|
|
102
106
|
: displayName;
|
|
@@ -109,18 +113,3 @@ export default class FlinkSQL extends BasicParser {
|
|
|
109
113
|
};
|
|
110
114
|
}
|
|
111
115
|
}
|
|
112
|
-
export class FlinkSqlSplitListener {
|
|
113
|
-
constructor() {
|
|
114
|
-
this._statementsContext = [];
|
|
115
|
-
this.exitSingleStatement = (ctx) => {
|
|
116
|
-
this._statementsContext.push(ctx);
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
visitTerminal() { }
|
|
120
|
-
visitErrorNode() { }
|
|
121
|
-
enterEveryRule() { }
|
|
122
|
-
exitEveryRule() { }
|
|
123
|
-
get statementsContext() {
|
|
124
|
-
return this._statementsContext;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { HiveSqlParserListener } from '../../lib';
|
|
2
|
+
import { ColumnNameCreateContext, CreateDatabaseStatementContext, CreateFunctionStatementContext, CreateMaterializedViewStatementContext, CreateTableStatementContext, CreateViewStatementContext, DbSchemaNameContext, DbSchemaNameCreateContext, FromInsertStmtContext, FromSelectStmtContext, FunctionNameCreateContext, InsertStmtContext, SelectStatementContext, StatementContext, TableNameContext, TableNameCreateContext, ViewNameContext, ViewNameCreateContext } from '../../lib/hive/HiveSqlParser';
|
|
3
|
+
import { EntityCollector } from '../common/entityCollector';
|
|
4
|
+
export declare class HiveEntityCollector extends EntityCollector implements HiveSqlParserListener {
|
|
5
|
+
/** ====== Entity Begin */
|
|
6
|
+
exitTableNameCreate(ctx: TableNameCreateContext): void;
|
|
7
|
+
exitTableName(ctx: TableNameContext): void;
|
|
8
|
+
exitColumnNameCreate(ctx: ColumnNameCreateContext): void;
|
|
9
|
+
exitViewNameCreate(ctx: ViewNameCreateContext): void;
|
|
10
|
+
exitViewName(ctx: ViewNameContext): void;
|
|
11
|
+
exitDbSchemaNameCreate(ctx: DbSchemaNameCreateContext): void;
|
|
12
|
+
exitDbSchemaName(ctx: DbSchemaNameContext): void;
|
|
13
|
+
exitFunctionNameCreate(ctx: FunctionNameCreateContext): void;
|
|
14
|
+
/** ==== Statement begin */
|
|
15
|
+
enterStatement(ctx: StatementContext): void;
|
|
16
|
+
exitStatement(): void;
|
|
17
|
+
enterCreateTableStatement(ctx: CreateTableStatementContext): void;
|
|
18
|
+
exitCreateTableStatement(): void;
|
|
19
|
+
enterSelectStatement(ctx: SelectStatementContext): void;
|
|
20
|
+
exitSelectStatement(ctx: SelectStatementContext): void;
|
|
21
|
+
enterFromSelectStmt(ctx: FromSelectStmtContext): void;
|
|
22
|
+
exitFromSelectStmt(ctx: FromSelectStmtContext): void;
|
|
23
|
+
enterCreateViewStatement(ctx: CreateViewStatementContext): void;
|
|
24
|
+
exitCreateViewStatement(ctx: CreateViewStatementContext): void;
|
|
25
|
+
enterCreateMaterializedViewStatement(ctx: CreateMaterializedViewStatementContext): void;
|
|
26
|
+
exitCreateMaterializedViewStatement(ctx: CreateMaterializedViewStatementContext): void;
|
|
27
|
+
enterInsertStmt(ctx: InsertStmtContext): void;
|
|
28
|
+
exitInsertStmt(ctx: InsertStmtContext): void;
|
|
29
|
+
enterFromInsertStmt(ctx: FromInsertStmtContext): void;
|
|
30
|
+
exitFromInsertStmt(ctx: FromInsertStmtContext): void;
|
|
31
|
+
enterCreateDatabaseStatement(ctx: CreateDatabaseStatementContext): void;
|
|
32
|
+
exitCreateDatabaseStatement(ctx: CreateDatabaseStatementContext): void;
|
|
33
|
+
enterFunctionNameCreate(ctx: FunctionNameCreateContext): void;
|
|
34
|
+
exitCreateFunctionStatement(ctx: CreateFunctionStatementContext): void;
|
|
35
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { EntityContextType } from '../common/types';
|
|
2
|
+
import { StmtContextType, EntityCollector } from '../common/entityCollector';
|
|
3
|
+
export class HiveEntityCollector extends EntityCollector {
|
|
4
|
+
/** ====== Entity Begin */
|
|
5
|
+
exitTableNameCreate(ctx) {
|
|
6
|
+
this.pushEntity(ctx, EntityContextType.TABLE_CREATE);
|
|
7
|
+
}
|
|
8
|
+
exitTableName(ctx) {
|
|
9
|
+
this.pushEntity(ctx, EntityContextType.TABLE);
|
|
10
|
+
}
|
|
11
|
+
exitColumnNameCreate(ctx) {
|
|
12
|
+
this.pushEntity(ctx, EntityContextType.COLUMN_CREATE);
|
|
13
|
+
}
|
|
14
|
+
exitViewNameCreate(ctx) {
|
|
15
|
+
this.pushEntity(ctx, EntityContextType.VIEW_CREATE);
|
|
16
|
+
}
|
|
17
|
+
exitViewName(ctx) {
|
|
18
|
+
this.pushEntity(ctx, EntityContextType.VIEW);
|
|
19
|
+
}
|
|
20
|
+
exitDbSchemaNameCreate(ctx) {
|
|
21
|
+
this.pushEntity(ctx, EntityContextType.DATABASE_CREATE);
|
|
22
|
+
}
|
|
23
|
+
exitDbSchemaName(ctx) {
|
|
24
|
+
this.pushEntity(ctx, EntityContextType.DATABASE);
|
|
25
|
+
}
|
|
26
|
+
exitFunctionNameCreate(ctx) {
|
|
27
|
+
this.pushEntity(ctx, EntityContextType.FUNCTION_CREATE);
|
|
28
|
+
}
|
|
29
|
+
/** ==== Statement begin */
|
|
30
|
+
enterStatement(ctx) {
|
|
31
|
+
this.pushStmt(ctx, StmtContextType.COMMON_STMT);
|
|
32
|
+
}
|
|
33
|
+
exitStatement() {
|
|
34
|
+
this.popStmt();
|
|
35
|
+
}
|
|
36
|
+
enterCreateTableStatement(ctx) {
|
|
37
|
+
this.pushStmt(ctx, StmtContextType.CREATE_TABLE_STMT);
|
|
38
|
+
}
|
|
39
|
+
exitCreateTableStatement() {
|
|
40
|
+
this.popStmt();
|
|
41
|
+
}
|
|
42
|
+
enterSelectStatement(ctx) {
|
|
43
|
+
this.pushStmt(ctx, StmtContextType.SELECT_STMT);
|
|
44
|
+
}
|
|
45
|
+
exitSelectStatement(ctx) {
|
|
46
|
+
this.popStmt();
|
|
47
|
+
}
|
|
48
|
+
enterFromSelectStmt(ctx) {
|
|
49
|
+
this.pushStmt(ctx, StmtContextType.SELECT_STMT);
|
|
50
|
+
}
|
|
51
|
+
exitFromSelectStmt(ctx) {
|
|
52
|
+
this.popStmt();
|
|
53
|
+
}
|
|
54
|
+
enterCreateViewStatement(ctx) {
|
|
55
|
+
this.pushStmt(ctx, StmtContextType.CREATE_VIEW_STMT);
|
|
56
|
+
}
|
|
57
|
+
exitCreateViewStatement(ctx) {
|
|
58
|
+
this.popStmt();
|
|
59
|
+
}
|
|
60
|
+
enterCreateMaterializedViewStatement(ctx) {
|
|
61
|
+
this.pushStmt(ctx, StmtContextType.CREATE_VIEW_STMT);
|
|
62
|
+
}
|
|
63
|
+
exitCreateMaterializedViewStatement(ctx) {
|
|
64
|
+
this.popStmt();
|
|
65
|
+
}
|
|
66
|
+
enterInsertStmt(ctx) {
|
|
67
|
+
this.pushStmt(ctx, StmtContextType.INSERT_STMT);
|
|
68
|
+
}
|
|
69
|
+
exitInsertStmt(ctx) {
|
|
70
|
+
this.popStmt();
|
|
71
|
+
}
|
|
72
|
+
enterFromInsertStmt(ctx) {
|
|
73
|
+
this.pushStmt(ctx, StmtContextType.INSERT_STMT);
|
|
74
|
+
}
|
|
75
|
+
exitFromInsertStmt(ctx) {
|
|
76
|
+
this.popStmt();
|
|
77
|
+
}
|
|
78
|
+
enterCreateDatabaseStatement(ctx) {
|
|
79
|
+
this.pushStmt(ctx, StmtContextType.CREATE_DATABASE_STMT);
|
|
80
|
+
}
|
|
81
|
+
exitCreateDatabaseStatement(ctx) {
|
|
82
|
+
this.popStmt();
|
|
83
|
+
}
|
|
84
|
+
enterFunctionNameCreate(ctx) {
|
|
85
|
+
this.pushStmt(ctx, StmtContextType.CREATE_FUNCTION_STMT);
|
|
86
|
+
}
|
|
87
|
+
exitCreateFunctionStatement(ctx) {
|
|
88
|
+
this.popStmt();
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { StatementContext } from '../../lib/hive/HiveSqlParser';
|
|
2
|
+
import { HiveSqlParserListener } from '../../lib/hive/HiveSqlParserListener';
|
|
3
|
+
import { SplitListener } from '../common/splitListener';
|
|
4
|
+
export declare class HiveSqlSplitListener extends SplitListener<StatementContext> implements HiveSqlParserListener {
|
|
5
|
+
exitStatement(ctx: StatementContext): void;
|
|
6
|
+
}
|