dt-sql-parser 4.0.0-beta.2.2 → 4.0.0-beta.3
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/CHANGELOG.md +2 -0
- package/README.md +6 -2
- package/build/antlr4.js +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/lib/flinksql/FlinkSqlLexer.d.ts +295 -297
- package/dist/lib/flinksql/FlinkSqlParser.d.ts +148 -149
- package/dist/lib/flinksql/FlinkSqlParserListener.d.ts +2 -4
- package/dist/lib/flinksql/FlinkSqlParserVisitor.d.ts +2 -4
- package/dist/lib/generic/SqlLexer.d.ts +1054 -1056
- package/dist/lib/generic/SqlParser.d.ts +590 -591
- package/dist/lib/generic/SqlParserListener.d.ts +2 -4
- package/dist/lib/generic/SqlParserVisitor.d.ts +2 -4
- package/dist/lib/hive/HiveSql.d.ts +231 -232
- package/dist/lib/hive/HiveSqlLexer.d.ts +380 -382
- package/dist/lib/hive/HiveSqlListener.d.ts +2 -4
- package/dist/lib/hive/HiveSqlVisitor.d.ts +2 -4
- package/dist/lib/pgsql/PostgreSQLLexer.d.ts +588 -0
- package/dist/lib/pgsql/PostgreSQLLexer.js +4830 -0
- package/dist/lib/pgsql/PostgreSQLLexer.js.map +1 -0
- package/dist/lib/pgsql/PostgreSQLParser.d.ts +15498 -0
- package/dist/lib/pgsql/PostgreSQLParser.js +117176 -0
- package/dist/lib/pgsql/PostgreSQLParser.js.map +1 -0
- package/dist/lib/pgsql/PostgreSQLParserListener.d.ts +1624 -0
- package/dist/lib/pgsql/PostgreSQLParserListener.js +4872 -0
- package/dist/lib/pgsql/PostgreSQLParserListener.js.map +1 -0
- package/dist/lib/pgsql/PostgreSQLParserVisitor.d.ts +814 -0
- package/dist/lib/pgsql/PostgreSQLParserVisitor.js +3252 -0
- package/dist/lib/pgsql/PostgreSQLParserVisitor.js.map +1 -0
- package/dist/lib/pgsql/base/PostgreSQLLexerBase.d.ts +14 -0
- package/dist/lib/pgsql/base/PostgreSQLLexerBase.js +89 -0
- package/dist/lib/pgsql/base/PostgreSQLLexerBase.js.map +1 -0
- package/dist/lib/pgsql/base/PostgreSQLParserBase.d.ts +13 -0
- package/dist/lib/pgsql/base/PostgreSQLParserBase.js +140 -0
- package/dist/lib/pgsql/base/PostgreSQLParserBase.js.map +1 -0
- package/dist/lib/plsql/PlSqlBaseLexer.d.ts +2 -4
- package/dist/lib/plsql/PlSqlBaseParser.d.ts +2 -4
- package/dist/lib/plsql/PlSqlLexer.d.ts +2257 -2259
- package/dist/lib/plsql/PlSqlParser.d.ts +757 -758
- package/dist/lib/plsql/PlSqlParserListener.d.ts +2 -4
- package/dist/lib/plsql/PlSqlParserVisitor.d.ts +2 -4
- package/dist/lib/spark/SparkSqlLexer.d.ts +299 -301
- package/dist/lib/spark/SparkSqlListener.d.ts +2 -4
- package/dist/lib/spark/SparkSqlParser.d.ts +293 -294
- package/dist/lib/spark/SparkSqlVisitor.d.ts +2 -4
- package/dist/parser/common/parserErrorListener.d.ts +1 -1
- package/dist/parser/index.d.ts +1 -0
- package/dist/parser/index.js +3 -0
- package/dist/parser/index.js.map +1 -1
- package/dist/parser/pgsql.d.ts +6 -0
- package/dist/parser/pgsql.js +19 -0
- package/dist/parser/pgsql.js.map +1 -0
- package/package.json +2 -2
- package/.vscode/launch.json +0 -7
- package/.vscode/settings.json +0 -14
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [4.0.0-beta.3](https://github.com/DTStack/dt-sql-parser/compare/v4.0.0-beta.2.2...v4.0.0-beta.3) (2022-12-16)
|
|
6
|
+
|
|
5
7
|
## [4.0.0-beta.2.2](https://github.com/DTStack/dt-sql-parser/compare/v4.0.0-beta.2.1...v4.0.0-beta.2.2) (2021-09-10)
|
|
6
8
|
|
|
7
9
|
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# dt-sql-parser
|
|
2
2
|
|
|
3
|
-
[![NPM version][npm-image]][npm-url] [![NPM downloads][download-img]][download-url]
|
|
3
|
+
[![NPM version][npm-image]][npm-url] [![NPM downloads][download-img]][download-url] [![Chat][online-chat-img]][online-chat-url]
|
|
4
4
|
|
|
5
5
|
English | [简体中文](./README-zh_CN.md)
|
|
6
6
|
|
|
@@ -10,6 +10,10 @@ English | [简体中文](./README-zh_CN.md)
|
|
|
10
10
|
[download-img]: https://img.shields.io/npm/dm/dt-sql-parser.svg?style=flat
|
|
11
11
|
[download-url]: https://www.npmjs.com/package/dt-sql-parser
|
|
12
12
|
|
|
13
|
+
[online-chat-img]: https://img.shields.io/discord/920616811261743104?logo=Molecule
|
|
14
|
+
[online-chat-url]: https://discord.gg/uVvq6mfPfa
|
|
15
|
+
|
|
16
|
+
|
|
13
17
|
dt-sql-parser is a **SQL Parser** project built with [ANTLR4](https://github.com/antlr/antlr4), and it's mainly for the **BigData** domain. The [ANTLR4](https://github.com/antlr/antlr4) generated the basic Parser, Visitor, and Listener, so it's easy to complete the **syntax validation**, **tokenizer**, **traverse** the AST, and so on features.
|
|
14
18
|
|
|
15
19
|
Besides, it provides some helper methods, like **split** SQL, and filter the `--` and `/**/` types of comments in SQL.
|
|
@@ -176,7 +180,7 @@ class MyListener extends SqlParserListener {
|
|
|
176
180
|
}
|
|
177
181
|
enterSelectElements(ctx) {
|
|
178
182
|
let selectElements = ctx.getText().toLowerCase()
|
|
179
|
-
log('SelectElements', selectElements)
|
|
183
|
+
console.log('SelectElements', selectElements)
|
|
180
184
|
}
|
|
181
185
|
}
|
|
182
186
|
const listenTableName = new MyListener();
|
package/build/antlr4.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -10,3 +10,5 @@ export * from './lib/plsql/PlSqlParserListener';
|
|
|
10
10
|
export * from './lib/plsql/PlSqlParserVisitor';
|
|
11
11
|
export * from './lib/spark/SparkSqlVisitor';
|
|
12
12
|
export * from './lib/spark/SparkSqlListener';
|
|
13
|
+
export * from './lib/pgsql/PostgreSQLParserListener';
|
|
14
|
+
export * from './lib/pgsql/PostgreSQLParserVisitor';
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
8
12
|
}));
|
|
9
13
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
15
|
};
|
|
12
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
17
|
__exportStar(require("./parser"), exports);
|
|
@@ -22,4 +26,6 @@ __exportStar(require("./lib/plsql/PlSqlParserListener"), exports);
|
|
|
22
26
|
__exportStar(require("./lib/plsql/PlSqlParserVisitor"), exports);
|
|
23
27
|
__exportStar(require("./lib/spark/SparkSqlVisitor"), exports);
|
|
24
28
|
__exportStar(require("./lib/spark/SparkSqlListener"), exports);
|
|
29
|
+
__exportStar(require("./lib/pgsql/PostgreSQLParserListener"), exports);
|
|
30
|
+
__exportStar(require("./lib/pgsql/PostgreSQLParserVisitor"), exports);
|
|
25
31
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,0CAAwB;AACxB,wEAAsD;AACtD,uEAAqD;AACrD,iEAA+C;AAC/C,kEAAgD;AAChD,6DAA2C;AAC3C,4DAA0C;AAC1C,kEAAgD;AAChD,iEAA+C;AAC/C,8DAA4C;AAC5C,+DAA6C;AAC7C,uEAAqD;AACrD,sEAAoD"}
|