dt-sql-parser 4.0.0-beta.4.5 → 4.0.0-beta.4.7

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.
Files changed (38) hide show
  1. package/README.md +16 -16
  2. package/dist/lib/flinksql/FlinkSqlLexer.d.ts +0 -1
  3. package/dist/lib/flinksql/FlinkSqlLexer.js +2611 -2622
  4. package/dist/lib/flinksql/FlinkSqlLexer.js.map +1 -1
  5. package/dist/lib/flinksql/FlinkSqlParser.d.ts +4 -13
  6. package/dist/lib/flinksql/FlinkSqlParser.js +2606 -2628
  7. package/dist/lib/flinksql/FlinkSqlParser.js.map +1 -1
  8. package/dist/lib/flinksql/FlinkSqlParserListener.d.ts +0 -13
  9. package/dist/lib/flinksql/FlinkSqlParserListener.js +1 -1
  10. package/dist/lib/flinksql/FlinkSqlParserListener.js.map +1 -1
  11. package/dist/lib/flinksql/FlinkSqlParserVisitor.d.ts +0 -8
  12. package/dist/lib/flinksql/FlinkSqlParserVisitor.js +1 -1
  13. package/dist/lib/flinksql/FlinkSqlParserVisitor.js.map +1 -1
  14. package/dist/lib/pgsql/PostgreSQLLexer.d.ts +561 -538
  15. package/dist/lib/pgsql/PostgreSQLLexer.js +3529 -3356
  16. package/dist/lib/pgsql/PostgreSQLLexer.js.map +1 -1
  17. package/dist/lib/pgsql/PostgreSQLParser.d.ts +4756 -3799
  18. package/dist/lib/pgsql/PostgreSQLParser.js +61779 -53458
  19. package/dist/lib/pgsql/PostgreSQLParser.js.map +1 -1
  20. package/dist/lib/pgsql/PostgreSQLParserListener.d.ts +757 -141
  21. package/dist/lib/pgsql/PostgreSQLParserListener.js +1 -1
  22. package/dist/lib/pgsql/PostgreSQLParserListener.js.map +1 -1
  23. package/dist/lib/pgsql/PostgreSQLParserVisitor.d.ts +481 -89
  24. package/dist/lib/pgsql/PostgreSQLParserVisitor.js +1 -1
  25. package/dist/lib/pgsql/PostgreSQLParserVisitor.js.map +1 -1
  26. package/dist/parser/common/basic-parser-types.d.ts +9 -1
  27. package/dist/parser/common/basic-parser-types.js +8 -0
  28. package/dist/parser/common/basic-parser-types.js.map +1 -1
  29. package/dist/parser/pgsql.d.ts +9 -2
  30. package/dist/parser/pgsql.js +107 -5
  31. package/dist/parser/pgsql.js.map +1 -1
  32. package/package.json +5 -4
  33. package/dist/lib/pgsql/PostgreSQLLexerBase.d.ts +0 -16
  34. package/dist/lib/pgsql/PostgreSQLLexerBase.js +0 -56
  35. package/dist/lib/pgsql/PostgreSQLLexerBase.js.map +0 -1
  36. package/dist/lib/pgsql/PostgreSQLParserBase.d.ts +0 -11
  37. package/dist/lib/pgsql/PostgreSQLParserBase.js +0 -96
  38. package/dist/lib/pgsql/PostgreSQLParserBase.js.map +0 -1
package/README.md CHANGED
@@ -13,9 +13,9 @@ English | [简体中文](./README-zh_CN.md)
13
13
  [online-chat-img]: https://img.shields.io/discord/920616811261743104?logo=Molecule
14
14
  [online-chat-url]: https://discord.gg/uVvq6mfPfa
15
15
 
16
- 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.
16
+ dt-sql-parser is a **SQL Parser** project built with [ANTLR4](https://github.com/antlr/antlr4), and it's mainly for the **BigData** field. 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.
17
17
 
18
- Additionally, it provides auxiliary functions such as SQL splitting and Auto-Complete.
18
+ Additionally, it provides auxiliary functions such as **SQL splitting** and **code completion**.
19
19
 
20
20
  **Supported SQL**:
21
21
 
@@ -29,15 +29,15 @@ Additionally, it provides auxiliary functions such as SQL splitting and Auto-Com
29
29
 
30
30
  **Supported auxiliary methods**
31
31
 
32
- | SQL Type | SQL Split | Code-Completion |
33
- | ----------- | -------- | -------- |
34
- | Generic SQL | WIP | WIP |
35
- | Flink SQL | ✅ | ✅ |
36
- | Spark SQL | ✅ | ✅ |
37
- | Hive SQL | ✅ | ✅ |
38
- | PL/SQL | WIP | WIP |
39
- | Postgre SQL | WIP | WIP |
40
- | Trino SQL | ✅ | ✅ |
32
+ | SQL Type | SQL Spliting | Code Completion |
33
+ | ----------- | ------------ | --------------- |
34
+ | Generic SQL | WIP | WIP |
35
+ | Flink SQL | ✅ | ✅ |
36
+ | Spark SQL | ✅ | ✅ |
37
+ | Hive SQL | ✅ | ✅ |
38
+ | PL/SQL | WIP | WIP |
39
+ | PostgreSQL | ✅ | ✅ |
40
+ | Trino SQL | ✅ | ✅ |
41
41
 
42
42
  >Tips: This project is the default for Javascript language, also you can try to compile it to other languages if you need.
43
43
 
@@ -68,13 +68,13 @@ We recommend learning the Fundamentals usage before continuing. The dt-sql-parse
68
68
  import { GenericSQL, FlinkSQL, SparkSQL, HiveSQL, PLSQL, PostgresSQL, TrinoSQL } from 'dt-sql-parser';
69
69
  ```
70
70
 
71
- Before employing syntax validation, code completion, and other features, it is necessary to instantiate the Parser of the relevant SQL type.
71
+ Before using syntax validation, code completion, and other features, it is necessary to instantiate the Parser of the relevant SQL type.
72
72
  For instance, one can consider using `GenericSQL` as an example:
73
73
  ```javascript
74
74
  const parser = new GenericSQL();
75
75
  ```
76
76
 
77
- The following usage examples will utilize the `GenericSQL`, and the Parser for other SQL types will be employed in a similar manner as `GenericSQL`.
77
+ The following usage examples will utilize the `GenericSQL`, and the Parser for other SQL types will be used in a similar manner as `GenericSQL`.
78
78
 
79
79
  ### Syntax Validation
80
80
  ```javascript
@@ -256,10 +256,10 @@ console.log(sqlSlices)
256
256
  ```
257
257
 
258
258
  ### Code Completion
259
- Obtaining autocomplete information at a specified position in SQL.
259
+ Obtaining code completion information at a specified position in SQL.
260
260
  We can refer to the example of using `FlinkSQL`.
261
261
 
262
- Invoke the `getSuggestionAtCaretPosition` method, pass the SQL content and the row and column numbers indicating the position where auto-completion is desired.
262
+ Invoke the `getSuggestionAtCaretPosition` method, pass the SQL content and the row and column numbers indicating the position where code completion is desired.
263
263
  + keyword candidates list
264
264
 
265
265
  ```javascript
@@ -313,7 +313,7 @@ Invoke the `getSuggestionAtCaretPosition` method, pass the SQL content and the r
313
313
  ]
314
314
  */
315
315
  ```
316
- The grammar-related autocomplete information returns an array, where each item represents what grammar can be filled in at that position. For example, the output in the above example represents that the position can be filled with either a **table name** or **a view name**. In this case, `syntaxContextType` represents the type of grammar that can be completed, and `wordRanges` represents the content that has already been filled.
316
+ The grammar-related code completion information returns an array, where each item represents what grammar can be filled in at that position. For example, the output in the above example represents that the position can be filled with either a **table name** or **a view name**. In this case, `syntaxContextType` represents the type of grammar that can be completed, and `wordRanges` represents the content that has already been filled.
317
317
 
318
318
  ### Other API
319
319
 
@@ -544,7 +544,6 @@ export declare class FlinkSqlLexer extends Lexer {
544
544
  static readonly REAL_LITERAL = 539;
545
545
  static readonly BIT_STRING = 540;
546
546
  static readonly ID_LITERAL = 541;
547
- static readonly SLASH_TEXT = 542;
548
547
  static readonly channelNames: string[];
549
548
  static readonly modeNames: string[];
550
549
  static readonly ruleNames: string[];