dt-sql-parser 4.0.0-beta.4.3 → 4.0.0-beta.4.4

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 - present DTStack
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -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 | Auto-Complete |
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 | WIP | WIP |
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 | ✅ | ✅ |
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
 
@@ -19,238 +19,238 @@ export declare class TrinoSqlLexer extends Lexer {
19
19
  static readonly T__13 = 14;
20
20
  static readonly T__14 = 15;
21
21
  static readonly T__15 = 16;
22
- static readonly ADD = 17;
23
- static readonly ADMIN = 18;
24
- static readonly AFTER = 19;
25
- static readonly ALL = 20;
26
- static readonly ALTER = 21;
27
- static readonly ANALYZE = 22;
28
- static readonly AND = 23;
29
- static readonly ANY = 24;
30
- static readonly ARRAY = 25;
31
- static readonly AS = 26;
32
- static readonly ASC = 27;
33
- static readonly AT = 28;
34
- static readonly AUTHORIZATION = 29;
35
- static readonly BERNOULLI = 30;
36
- static readonly BETWEEN = 31;
37
- static readonly BY = 32;
38
- static readonly CALL = 33;
39
- static readonly CASCADE = 34;
40
- static readonly CASE = 35;
41
- static readonly CAST = 36;
42
- static readonly CATALOGS = 37;
43
- static readonly COLUMN = 38;
44
- static readonly COLUMNS = 39;
45
- static readonly COMMENT = 40;
46
- static readonly COMMIT = 41;
47
- static readonly COMMITTED = 42;
48
- static readonly CONSTRAINT = 43;
49
- static readonly CREATE = 44;
50
- static readonly CROSS = 45;
51
- static readonly CUBE = 46;
52
- static readonly CURRENT = 47;
53
- static readonly CURRENT_CATALOG = 48;
54
- static readonly CURRENT_DATE = 49;
55
- static readonly CURRENT_PATH = 50;
56
- static readonly CURRENT_ROLE = 51;
57
- static readonly CURRENT_SCHEMA = 52;
58
- static readonly CURRENT_TIME = 53;
59
- static readonly CURRENT_TIMESTAMP = 54;
60
- static readonly CURRENT_USER = 55;
61
- static readonly DATA = 56;
62
- static readonly DATE = 57;
63
- static readonly DAY = 58;
64
- static readonly DEFAULT = 59;
65
- static readonly DEALLOCATE = 60;
66
- static readonly DEFINER = 61;
67
- static readonly DELETE = 62;
68
- static readonly DESC = 63;
69
- static readonly DESCRIBE = 64;
70
- static readonly DEFINE = 65;
71
- static readonly DISTINCT = 66;
72
- static readonly DISTRIBUTED = 67;
73
- static readonly DOUBLE = 68;
74
- static readonly DROP = 69;
75
- static readonly ELSE = 70;
76
- static readonly EMPTY = 71;
77
- static readonly END = 72;
78
- static readonly ESCAPE = 73;
79
- static readonly EXCEPT = 74;
80
- static readonly EXCLUDING = 75;
81
- static readonly EXECUTE = 76;
82
- static readonly EXISTS = 77;
83
- static readonly EXPLAIN = 78;
84
- static readonly EXTRACT = 79;
85
- static readonly FALSE = 80;
86
- static readonly FETCH = 81;
87
- static readonly FILTER = 82;
88
- static readonly FINAL = 83;
89
- static readonly FIRST = 84;
90
- static readonly FOLLOWING = 85;
91
- static readonly FOR = 86;
92
- static readonly FORMAT = 87;
93
- static readonly FROM = 88;
94
- static readonly FULL = 89;
95
- static readonly FUNCTIONS = 90;
96
- static readonly GRANT = 91;
97
- static readonly GRANTED = 92;
98
- static readonly GRANTS = 93;
99
- static readonly DENY = 94;
100
- static readonly GRAPHVIZ = 95;
101
- static readonly GROUP = 96;
102
- static readonly GROUPING = 97;
103
- static readonly GROUPS = 98;
104
- static readonly HAVING = 99;
105
- static readonly HOUR = 100;
106
- static readonly IF = 101;
107
- static readonly IGNORE = 102;
108
- static readonly IN = 103;
109
- static readonly INCLUDING = 104;
110
- static readonly INITIAL = 105;
111
- static readonly INNER = 106;
112
- static readonly INPUT = 107;
113
- static readonly INSERT = 108;
114
- static readonly INTERSECT = 109;
115
- static readonly INTERVAL = 110;
116
- static readonly INTO = 111;
117
- static readonly INVOKER = 112;
118
- static readonly IO = 113;
119
- static readonly IS = 114;
120
- static readonly ISOLATION = 115;
121
- static readonly JOIN = 116;
122
- static readonly JSON = 117;
123
- static readonly LAST = 118;
124
- static readonly LATERAL = 119;
125
- static readonly LEFT = 120;
126
- static readonly LEVEL = 121;
127
- static readonly LIKE = 122;
128
- static readonly LIMIT = 123;
129
- static readonly LOCAL = 124;
130
- static readonly LOCALTIME = 125;
131
- static readonly LOCALTIMESTAMP = 126;
132
- static readonly LOGICAL = 127;
133
- static readonly MAP = 128;
134
- static readonly MATCH = 129;
135
- static readonly MATCHED = 130;
136
- static readonly MATCHES = 131;
137
- static readonly MATCH_RECOGNIZE = 132;
138
- static readonly MATERIALIZED = 133;
139
- static readonly MEASURES = 134;
140
- static readonly MERGE = 135;
141
- static readonly MINUTE = 136;
142
- static readonly MONTH = 137;
143
- static readonly NATURAL = 138;
144
- static readonly NEXT = 139;
145
- static readonly NFC = 140;
146
- static readonly NFD = 141;
147
- static readonly NFKC = 142;
148
- static readonly NFKD = 143;
149
- static readonly NO = 144;
150
- static readonly NONE = 145;
151
- static readonly NORMALIZE = 146;
152
- static readonly NOT = 147;
153
- static readonly NULL = 148;
154
- static readonly NULLIF = 149;
155
- static readonly NULLS = 150;
156
- static readonly OFFSET = 151;
157
- static readonly OMIT = 152;
158
- static readonly ON = 153;
159
- static readonly ONE = 154;
160
- static readonly ONLY = 155;
161
- static readonly OPTION = 156;
162
- static readonly OR = 157;
163
- static readonly ORDER = 158;
164
- static readonly ORDINALITY = 159;
165
- static readonly OUTER = 160;
166
- static readonly OUTPUT = 161;
167
- static readonly OVER = 162;
168
- static readonly PARTITION = 163;
169
- static readonly PARTITIONS = 164;
170
- static readonly PAST = 165;
171
- static readonly PATH = 166;
172
- static readonly PATTERN = 167;
173
- static readonly PER = 168;
174
- static readonly PERMUTE = 169;
175
- static readonly POSITION = 170;
176
- static readonly PRECEDING = 171;
177
- static readonly PRECISION = 172;
178
- static readonly PREPARE = 173;
179
- static readonly PRIVILEGES = 174;
180
- static readonly PROPERTIES = 175;
181
- static readonly RANGE = 176;
182
- static readonly READ = 177;
183
- static readonly RECURSIVE = 178;
184
- static readonly REFRESH = 179;
185
- static readonly RENAME = 180;
186
- static readonly REPEATABLE = 181;
187
- static readonly REPLACE = 182;
188
- static readonly RESET = 183;
189
- static readonly RESPECT = 184;
190
- static readonly RESTRICT = 185;
191
- static readonly REVOKE = 186;
192
- static readonly RIGHT = 187;
193
- static readonly ROLE = 188;
194
- static readonly ROLES = 189;
195
- static readonly ROLLBACK = 190;
196
- static readonly ROLLUP = 191;
197
- static readonly ROW = 192;
198
- static readonly ROWS = 193;
199
- static readonly RUNNING = 194;
200
- static readonly SCHEMA = 195;
201
- static readonly SCHEMAS = 196;
202
- static readonly SECOND = 197;
203
- static readonly SECURITY = 198;
204
- static readonly SEEK = 199;
205
- static readonly SELECT = 200;
206
- static readonly SERIALIZABLE = 201;
207
- static readonly SESSION = 202;
208
- static readonly SET = 203;
209
- static readonly SETS = 204;
210
- static readonly SHOW = 205;
211
- static readonly SOME = 206;
212
- static readonly START = 207;
213
- static readonly STATS = 208;
214
- static readonly SUBSET = 209;
215
- static readonly SUBSTRING = 210;
216
- static readonly SYSTEM = 211;
217
- static readonly TABLE = 212;
218
- static readonly TABLES = 213;
219
- static readonly TABLESAMPLE = 214;
220
- static readonly TEXT = 215;
221
- static readonly THEN = 216;
222
- static readonly TIES = 217;
223
- static readonly TIME = 218;
224
- static readonly TIMESTAMP = 219;
225
- static readonly TO = 220;
226
- static readonly TRANSACTION = 221;
227
- static readonly TRUNCATE = 222;
228
- static readonly TRUE = 223;
229
- static readonly TRY_CAST = 224;
230
- static readonly TYPE = 225;
231
- static readonly UESCAPE = 226;
232
- static readonly UNBOUNDED = 227;
233
- static readonly UNCOMMITTED = 228;
234
- static readonly UNION = 229;
235
- static readonly UNMATCHED = 230;
236
- static readonly UNNEST = 231;
237
- static readonly UPDATE = 232;
238
- static readonly USE = 233;
239
- static readonly USER = 234;
240
- static readonly USING = 235;
241
- static readonly VALIDATE = 236;
242
- static readonly VALUES = 237;
243
- static readonly VERBOSE = 238;
244
- static readonly VIEW = 239;
245
- static readonly WHEN = 240;
246
- static readonly WHERE = 241;
247
- static readonly WINDOW = 242;
248
- static readonly WITH = 243;
249
- static readonly WITHOUT = 244;
250
- static readonly WORK = 245;
251
- static readonly WRITE = 246;
252
- static readonly YEAR = 247;
253
- static readonly ZONE = 248;
22
+ static readonly KW_ADD = 17;
23
+ static readonly KW_ADMIN = 18;
24
+ static readonly KW_AFTER = 19;
25
+ static readonly KW_ALL = 20;
26
+ static readonly KW_ALTER = 21;
27
+ static readonly KW_ANALYZE = 22;
28
+ static readonly KW_AND = 23;
29
+ static readonly KW_ANY = 24;
30
+ static readonly KW_ARRAY = 25;
31
+ static readonly KW_AS = 26;
32
+ static readonly KW_ASC = 27;
33
+ static readonly KW_AT = 28;
34
+ static readonly KW_AUTHORIZATION = 29;
35
+ static readonly KW_BERNOULLI = 30;
36
+ static readonly KW_BETWEEN = 31;
37
+ static readonly KW_BY = 32;
38
+ static readonly KW_CALL = 33;
39
+ static readonly KW_CASCADE = 34;
40
+ static readonly KW_CASE = 35;
41
+ static readonly KW_CAST = 36;
42
+ static readonly KW_CATALOGS = 37;
43
+ static readonly KW_COLUMN = 38;
44
+ static readonly KW_COLUMNS = 39;
45
+ static readonly KW_COMMENT = 40;
46
+ static readonly KW_COMMIT = 41;
47
+ static readonly KW_COMMITTED = 42;
48
+ static readonly KW_CONSTRAINT = 43;
49
+ static readonly KW_CREATE = 44;
50
+ static readonly KW_CROSS = 45;
51
+ static readonly KW_CUBE = 46;
52
+ static readonly KW_CURRENT = 47;
53
+ static readonly KW_CURRENT_CATALOG = 48;
54
+ static readonly KW_CURRENT_DATE = 49;
55
+ static readonly KW_CURRENT_PATH = 50;
56
+ static readonly KW_CURRENT_ROLE = 51;
57
+ static readonly KW_CURRENT_SCHEMA = 52;
58
+ static readonly KW_CURRENT_TIME = 53;
59
+ static readonly KW_CURRENT_TIMESTAMP = 54;
60
+ static readonly KW_CURRENT_USER = 55;
61
+ static readonly KW_DATA = 56;
62
+ static readonly KW_DATE = 57;
63
+ static readonly KW_DAY = 58;
64
+ static readonly KW_DEFAULT = 59;
65
+ static readonly KW_DEALLOCATE = 60;
66
+ static readonly KW_DEFINER = 61;
67
+ static readonly KW_DELETE = 62;
68
+ static readonly KW_DESC = 63;
69
+ static readonly KW_DESCRIBE = 64;
70
+ static readonly KW_DEFINE = 65;
71
+ static readonly KW_DISTINCT = 66;
72
+ static readonly KW_DISTRIBUTED = 67;
73
+ static readonly KW_DOUBLE = 68;
74
+ static readonly KW_DROP = 69;
75
+ static readonly KW_ELSE = 70;
76
+ static readonly KW_EMPTY = 71;
77
+ static readonly KW_END = 72;
78
+ static readonly KW_ESCAPE = 73;
79
+ static readonly KW_EXCEPT = 74;
80
+ static readonly KW_EXCLUDING = 75;
81
+ static readonly KW_EXECUTE = 76;
82
+ static readonly KW_EXISTS = 77;
83
+ static readonly KW_EXPLAIN = 78;
84
+ static readonly KW_EXTRACT = 79;
85
+ static readonly KW_FALSE = 80;
86
+ static readonly KW_FETCH = 81;
87
+ static readonly KW_FILTER = 82;
88
+ static readonly KW_FINAL = 83;
89
+ static readonly KW_FIRST = 84;
90
+ static readonly KW_FOLLOWING = 85;
91
+ static readonly KW_FOR = 86;
92
+ static readonly KW_FORMAT = 87;
93
+ static readonly KW_FROM = 88;
94
+ static readonly KW_FULL = 89;
95
+ static readonly KW_FUNCTIONS = 90;
96
+ static readonly KW_GRANT = 91;
97
+ static readonly KW_GRANTED = 92;
98
+ static readonly KW_GRANTS = 93;
99
+ static readonly KW_DENY = 94;
100
+ static readonly KW_GRAPHVIZ = 95;
101
+ static readonly KW_GROUP = 96;
102
+ static readonly KW_GROUPING = 97;
103
+ static readonly KW_GROUPS = 98;
104
+ static readonly KW_HAVING = 99;
105
+ static readonly KW_HOUR = 100;
106
+ static readonly KW_IF = 101;
107
+ static readonly KW_IGNORE = 102;
108
+ static readonly KW_IN = 103;
109
+ static readonly KW_INCLUDING = 104;
110
+ static readonly KW_INITIAL = 105;
111
+ static readonly KW_INNER = 106;
112
+ static readonly KW_INPUT = 107;
113
+ static readonly KW_INSERT = 108;
114
+ static readonly KW_INTERSECT = 109;
115
+ static readonly KW_INTERVAL = 110;
116
+ static readonly KW_INTO = 111;
117
+ static readonly KW_INVOKER = 112;
118
+ static readonly KW_IO = 113;
119
+ static readonly KW_IS = 114;
120
+ static readonly KW_ISOLATION = 115;
121
+ static readonly KW_JOIN = 116;
122
+ static readonly KW_JSON = 117;
123
+ static readonly KW_LAST = 118;
124
+ static readonly KW_LATERAL = 119;
125
+ static readonly KW_LEFT = 120;
126
+ static readonly KW_LEVEL = 121;
127
+ static readonly KW_LIKE = 122;
128
+ static readonly KW_LIMIT = 123;
129
+ static readonly KW_LOCAL = 124;
130
+ static readonly KW_LOCALTIME = 125;
131
+ static readonly KW_LOCALTIMESTAMP = 126;
132
+ static readonly KW_LOGICAL = 127;
133
+ static readonly KW_MAP = 128;
134
+ static readonly KW_MATCH = 129;
135
+ static readonly KW_MATCHED = 130;
136
+ static readonly KW_MATCHES = 131;
137
+ static readonly KW_MATCH_RECOGNIZE = 132;
138
+ static readonly KW_MATERIALIZED = 133;
139
+ static readonly KW_MEASURES = 134;
140
+ static readonly KW_MERGE = 135;
141
+ static readonly KW_MINUTE = 136;
142
+ static readonly KW_MONTH = 137;
143
+ static readonly KW_NATURAL = 138;
144
+ static readonly KW_NEXT = 139;
145
+ static readonly KW_NFC = 140;
146
+ static readonly KW_NFD = 141;
147
+ static readonly KW_NFKC = 142;
148
+ static readonly KW_NFKD = 143;
149
+ static readonly KW_NO = 144;
150
+ static readonly KW_NONE = 145;
151
+ static readonly KW_NORMALIZE = 146;
152
+ static readonly KW_NOT = 147;
153
+ static readonly KW_NULL = 148;
154
+ static readonly KW_NULLIF = 149;
155
+ static readonly KW_NULLS = 150;
156
+ static readonly KW_OFFSET = 151;
157
+ static readonly KW_OMIT = 152;
158
+ static readonly KW_ON = 153;
159
+ static readonly KW_ONE = 154;
160
+ static readonly KW_ONLY = 155;
161
+ static readonly KW_OPTION = 156;
162
+ static readonly KW_OR = 157;
163
+ static readonly KW_ORDER = 158;
164
+ static readonly KW_ORDINALITY = 159;
165
+ static readonly KW_OUTER = 160;
166
+ static readonly KW_OUTPUT = 161;
167
+ static readonly KW_OVER = 162;
168
+ static readonly KW_PARTITION = 163;
169
+ static readonly KW_PARTITIONS = 164;
170
+ static readonly KW_PAST = 165;
171
+ static readonly KW_PATH = 166;
172
+ static readonly KW_PATTERN = 167;
173
+ static readonly KW_PER = 168;
174
+ static readonly KW_PERMUTE = 169;
175
+ static readonly KW_POSITION = 170;
176
+ static readonly KW_PRECEDING = 171;
177
+ static readonly KW_PRECISION = 172;
178
+ static readonly KW_PREPARE = 173;
179
+ static readonly KW_PRIVILEGES = 174;
180
+ static readonly KW_PROPERTIES = 175;
181
+ static readonly KW_RANGE = 176;
182
+ static readonly KW_READ = 177;
183
+ static readonly KW_RECURSIVE = 178;
184
+ static readonly KW_REFRESH = 179;
185
+ static readonly KW_RENAME = 180;
186
+ static readonly KW_REPEATABLE = 181;
187
+ static readonly KW_REPLACE = 182;
188
+ static readonly KW_RESET = 183;
189
+ static readonly KW_RESPECT = 184;
190
+ static readonly KW_RESTRICT = 185;
191
+ static readonly KW_REVOKE = 186;
192
+ static readonly KW_RIGHT = 187;
193
+ static readonly KW_ROLE = 188;
194
+ static readonly KW_ROLES = 189;
195
+ static readonly KW_ROLLBACK = 190;
196
+ static readonly KW_ROLLUP = 191;
197
+ static readonly KW_ROW = 192;
198
+ static readonly KW_ROWS = 193;
199
+ static readonly KW_RUNNING = 194;
200
+ static readonly KW_SCHEMA = 195;
201
+ static readonly KW_SCHEMAS = 196;
202
+ static readonly KW_SECOND = 197;
203
+ static readonly KW_SECURITY = 198;
204
+ static readonly KW_SEEK = 199;
205
+ static readonly KW_SELECT = 200;
206
+ static readonly KW_SERIALIZABLE = 201;
207
+ static readonly KW_SESSION = 202;
208
+ static readonly KW_SET = 203;
209
+ static readonly KW_SETS = 204;
210
+ static readonly KW_SHOW = 205;
211
+ static readonly KW_SOME = 206;
212
+ static readonly KW_START = 207;
213
+ static readonly KW_STATS = 208;
214
+ static readonly KW_SUBSET = 209;
215
+ static readonly KW_SUBSTRING = 210;
216
+ static readonly KW_SYSTEM = 211;
217
+ static readonly KW_TABLE = 212;
218
+ static readonly KW_TABLES = 213;
219
+ static readonly KW_TABLESAMPLE = 214;
220
+ static readonly KW_TEXT = 215;
221
+ static readonly KW_THEN = 216;
222
+ static readonly KW_TIES = 217;
223
+ static readonly KW_TIME = 218;
224
+ static readonly KW_TIMESTAMP = 219;
225
+ static readonly KW_TO = 220;
226
+ static readonly KW_TRANSACTION = 221;
227
+ static readonly KW_TRUNCATE = 222;
228
+ static readonly KW_TRUE = 223;
229
+ static readonly KW_TRY_CAST = 224;
230
+ static readonly KW_TYPE = 225;
231
+ static readonly KW_UESCAPE = 226;
232
+ static readonly KW_UNBOUNDED = 227;
233
+ static readonly KW_UNCOMMITTED = 228;
234
+ static readonly KW_UNION = 229;
235
+ static readonly KW_UNMATCHED = 230;
236
+ static readonly KW_UNNEST = 231;
237
+ static readonly KW_UPDATE = 232;
238
+ static readonly KW_USE = 233;
239
+ static readonly KW_USER = 234;
240
+ static readonly KW_USING = 235;
241
+ static readonly KW_VALIDATE = 236;
242
+ static readonly KW_VALUES = 237;
243
+ static readonly KW_VERBOSE = 238;
244
+ static readonly KW_VIEW = 239;
245
+ static readonly KW_WHEN = 240;
246
+ static readonly KW_WHERE = 241;
247
+ static readonly KW_WINDOW = 242;
248
+ static readonly KW_WITH = 243;
249
+ static readonly KW_WITHOUT = 244;
250
+ static readonly KW_WORK = 245;
251
+ static readonly KW_WRITE = 246;
252
+ static readonly KW_YEAR = 247;
253
+ static readonly KW_ZONE = 248;
254
254
  static readonly EQ = 249;
255
255
  static readonly NEQ = 250;
256
256
  static readonly LT = 251;