Skip to content

Commit 16e7632

Browse files
committed
Regenerate the test data
1 parent a40cf3e commit 16e7632

7 files changed

+403
-701
lines changed

tests/data/parser/parseAlterTableAddUniqueKeyAsc.out

Lines changed: 55 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,18 @@
22
"query": "ALTER TABLE `bad_table_is_bad` ADD UNIQUE KEY `column1` (`column1`, `column2` ASC);",
33
"lexer": {
44
"@type": "PhpMyAdmin\\SqlParser\\Lexer",
5-
"strict": false,
6-
"errors": [],
75
"str": "ALTER TABLE `bad_table_is_bad` ADD UNIQUE KEY `column1` (`column1`, `column2` ASC);",
86
"len": 83,
97
"last": 83,
108
"list": {
119
"@type": "PhpMyAdmin\\SqlParser\\TokensList",
12-
"count": 22,
13-
"idx": 22,
1410
"tokens": [
1511
{
1612
"@type": "PhpMyAdmin\\SqlParser\\Token",
1713
"token": "ALTER",
1814
"value": "ALTER",
1915
"keyword": "ALTER",
20-
"type": {
21-
"@type": "PhpMyAdmin\\SqlParser\\TokenType",
22-
"name": "Keyword",
23-
"value": 1
24-
},
16+
"type": 1,
2517
"flags": 3,
2618
"position": 0
2719
},
@@ -30,11 +22,7 @@
3022
"token": " ",
3123
"value": " ",
3224
"keyword": null,
33-
"type": {
34-
"@type": "PhpMyAdmin\\SqlParser\\TokenType",
35-
"name": "Whitespace",
36-
"value": 3
37-
},
25+
"type": 3,
3826
"flags": 0,
3927
"position": 5
4028
},
@@ -43,9 +31,7 @@
4331
"token": "TABLE",
4432
"value": "TABLE",
4533
"keyword": "TABLE",
46-
"type": {
47-
"@type": "@3"
48-
},
34+
"type": 1,
4935
"flags": 3,
5036
"position": 6
5137
},
@@ -54,9 +40,7 @@
5440
"token": " ",
5541
"value": " ",
5642
"keyword": null,
57-
"type": {
58-
"@type": "@5"
59-
},
43+
"type": 3,
6044
"flags": 0,
6145
"position": 11
6246
},
@@ -65,11 +49,7 @@
6549
"token": "`bad_table_is_bad`",
6650
"value": "bad_table_is_bad",
6751
"keyword": null,
68-
"type": {
69-
"@type": "PhpMyAdmin\\SqlParser\\TokenType",
70-
"name": "Symbol",
71-
"value": 8
72-
},
52+
"type": 8,
7353
"flags": 2,
7454
"position": 12
7555
},
@@ -78,9 +58,7 @@
7858
"token": " ",
7959
"value": " ",
8060
"keyword": null,
81-
"type": {
82-
"@type": "@5"
83-
},
61+
"type": 3,
8462
"flags": 0,
8563
"position": 30
8664
},
@@ -89,9 +67,7 @@
8967
"token": "ADD",
9068
"value": "ADD",
9169
"keyword": "ADD",
92-
"type": {
93-
"@type": "@3"
94-
},
70+
"type": 1,
9571
"flags": 3,
9672
"position": 31
9773
},
@@ -100,9 +76,7 @@
10076
"token": " ",
10177
"value": " ",
10278
"keyword": null,
103-
"type": {
104-
"@type": "@5"
105-
},
79+
"type": 3,
10680
"flags": 0,
10781
"position": 34
10882
},
@@ -111,9 +85,7 @@
11185
"token": "UNIQUE KEY",
11286
"value": "UNIQUE KEY",
11387
"keyword": "UNIQUE KEY",
114-
"type": {
115-
"@type": "@3"
116-
},
88+
"type": 1,
11789
"flags": 23,
11890
"position": 35
11991
},
@@ -122,9 +94,7 @@
12294
"token": " ",
12395
"value": " ",
12496
"keyword": null,
125-
"type": {
126-
"@type": "@5"
127-
},
97+
"type": 3,
12898
"flags": 0,
12999
"position": 45
130100
},
@@ -133,9 +103,7 @@
133103
"token": "`column1`",
134104
"value": "column1",
135105
"keyword": null,
136-
"type": {
137-
"@type": "@9"
138-
},
106+
"type": 8,
139107
"flags": 2,
140108
"position": 46
141109
},
@@ -144,9 +112,7 @@
144112
"token": " ",
145113
"value": " ",
146114
"keyword": null,
147-
"type": {
148-
"@type": "@5"
149-
},
115+
"type": 3,
150116
"flags": 0,
151117
"position": 55
152118
},
@@ -155,11 +121,7 @@
155121
"token": "(",
156122
"value": "(",
157123
"keyword": null,
158-
"type": {
159-
"@type": "PhpMyAdmin\\SqlParser\\TokenType",
160-
"name": "Operator",
161-
"value": 2
162-
},
124+
"type": 2,
163125
"flags": 16,
164126
"position": 56
165127
},
@@ -168,9 +130,7 @@
168130
"token": "`column1`",
169131
"value": "column1",
170132
"keyword": null,
171-
"type": {
172-
"@type": "@9"
173-
},
133+
"type": 8,
174134
"flags": 2,
175135
"position": 57
176136
},
@@ -179,9 +139,7 @@
179139
"token": ",",
180140
"value": ",",
181141
"keyword": null,
182-
"type": {
183-
"@type": "@18"
184-
},
142+
"type": 2,
185143
"flags": 16,
186144
"position": 66
187145
},
@@ -190,9 +148,7 @@
190148
"token": " ",
191149
"value": " ",
192150
"keyword": null,
193-
"type": {
194-
"@type": "@5"
195-
},
151+
"type": 3,
196152
"flags": 0,
197153
"position": 67
198154
},
@@ -201,9 +157,7 @@
201157
"token": "`column2`",
202158
"value": "column2",
203159
"keyword": null,
204-
"type": {
205-
"@type": "@9"
206-
},
160+
"type": 8,
207161
"flags": 2,
208162
"position": 68
209163
},
@@ -212,9 +166,7 @@
212166
"token": " ",
213167
"value": " ",
214168
"keyword": null,
215-
"type": {
216-
"@type": "@5"
217-
},
169+
"type": 3,
218170
"flags": 0,
219171
"position": 77
220172
},
@@ -223,9 +175,7 @@
223175
"token": "ASC",
224176
"value": "ASC",
225177
"keyword": "ASC",
226-
"type": {
227-
"@type": "@3"
228-
},
178+
"type": 1,
229179
"flags": 3,
230180
"position": 78
231181
},
@@ -234,9 +184,7 @@
234184
"token": ")",
235185
"value": ")",
236186
"keyword": null,
237-
"type": {
238-
"@type": "@18"
239-
},
187+
"type": 2,
240188
"flags": 16,
241189
"position": 81
242190
},
@@ -245,34 +193,30 @@
245193
"token": ";",
246194
"value": ";",
247195
"keyword": null,
248-
"type": {
249-
"@type": "PhpMyAdmin\\SqlParser\\TokenType",
250-
"name": "Delimiter",
251-
"value": 9
252-
},
196+
"type": 9,
253197
"flags": 0,
254198
"position": 82
255199
},
256200
{
257201
"@type": "PhpMyAdmin\\SqlParser\\Token",
258-
"token": "",
259-
"value": "",
202+
"token": null,
203+
"value": null,
260204
"keyword": null,
261-
"type": {
262-
"@type": "@27"
263-
},
205+
"type": 9,
264206
"flags": 0,
265207
"position": null
266208
}
267-
]
209+
],
210+
"count": 22,
211+
"idx": 22
268212
},
269213
"delimiter": ";",
270-
"delimiterLen": 1
214+
"delimiterLen": 1,
215+
"strict": false,
216+
"errors": []
271217
},
272218
"parser": {
273219
"@type": "PhpMyAdmin\\SqlParser\\Parser",
274-
"strict": false,
275-
"errors": [],
276220
"list": {
277221
"@type": "@1"
278222
},
@@ -292,6 +236,20 @@
292236
"altered": [
293237
{
294238
"@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation",
239+
"ROUTINE_OPTIONS": {
240+
"COMMENT": [
241+
1,
242+
"var"
243+
],
244+
"LANGUAGE SQL": 2,
245+
"CONTAINS SQL": 3,
246+
"NO SQL": 3,
247+
"READS SQL DATA": 3,
248+
"MODIFIES SQL DATA": 3,
249+
"SQL SECURITY": 4,
250+
"DEFINER": 5,
251+
"INVOKER": 5
252+
},
295253
"options": {
296254
"@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray",
297255
"options": {
@@ -312,28 +270,28 @@
312270
"partitions": null,
313271
"unknown": [
314272
{
315-
"@type": "@17"
273+
"@type": "@14"
316274
},
317275
{
318-
"@type": "@19"
276+
"@type": "@15"
319277
},
320278
{
321-
"@type": "@20"
279+
"@type": "@16"
322280
},
323281
{
324-
"@type": "@21"
282+
"@type": "@17"
325283
},
326284
{
327-
"@type": "@22"
285+
"@type": "@18"
328286
},
329287
{
330-
"@type": "@23"
288+
"@type": "@19"
331289
},
332290
{
333-
"@type": "@24"
291+
"@type": "@20"
334292
},
335293
{
336-
"@type": "@25"
294+
"@type": "@21"
337295
}
338296
]
339297
}
@@ -348,7 +306,9 @@
348306
"last": 20
349307
}
350308
],
351-
"brackets": 0
309+
"brackets": 0,
310+
"strict": false,
311+
"errors": []
352312
},
353313
"errors": {
354314
"lexer": [],

0 commit comments

Comments
 (0)