-
Notifications
You must be signed in to change notification settings - Fork 399
/
sql_parsing.json
60 lines (57 loc) · 5.89 KB
/
sql_parsing.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
[
{"input":"SELECT * FROM foobar", "operation":"select", "table":"foobar"},
{"input":"SELECT F FROM foobar", "operation":"select", "table":"foobar"},
{"input":"SELECT Ff FROM foobar", "operation":"select", "table":"foobar"},
{"input":"SELECT I FROM foobar", "operation":"select", "table":"foobar"},
{"input":"SELECT FROMM FROM foobar", "operation":"select", "table":"foobar"},
{"input":"SELECT * FROM foobar WHERE x > y", "operation":"select", "table":"foobar"},
{"input":"SELECT * FROM `foobar`", "operation":"select", "table":"foobar"},
{"input":"SELECT * FROM `foobar` WHERE x > y", "operation":"select", "table":"foobar"},
{"input":"SELECT * FROM database.foobar", "operation":"select", "table":"foobar"},
{"input":"SELECT * FROM database.foobar WHERE x > y", "operation":"select", "table":"foobar"},
{"input":"SELECT * FROM `database`.foobar", "operation":"select", "table":"foobar"},
{"input":"SELECT * FROM `database`.foobar WHERE x > y", "operation":"select", "table":"foobar"},
{"input":"SELECT * FROM database.`foobar`", "operation":"select", "table":"foobar"},
{"input":"SELECT * FROM database.`foobar` WHERE x > y", "operation":"select", "table":"foobar"},
{"input":"SELECT * FROM (foobar)", "operation":"select", "table":"foobar"},
{"input":"SELECT * FROM(foobar)", "operation":"select", "table":"foobar"},
{"input":"SELECT * FROM (foobar) WHERE x > y", "operation":"select", "table":"foobar"},
{"input":"SELECT * FROM (`foobar`)", "operation":"select", "table":"foobar"},
{"input":"SELECT * FROM (`foobar`) WHERE x > y", "operation":"select", "table":"foobar"},
{"input":"SELECT * FROM (SELECT * FROM foobar)", "operation":"select", "table":"(subquery)"},
{"input":"SELECT * FROM (SELECT * FROM foobar) WHERE x > y", "operation":"select", "table":"(subquery)"},
{"input":"SELECT xy,zz,y FROM foobar", "operation":"select", "table":"foobar"},
{"input":"SELECT xy,zz,y FROM foobar ORDER BY zy", "operation":"select", "table":"foobar"},
{"input":"SELECT xy,zz,y FROM `foobar`", "operation":"select", "table":"foobar"},
{"input":"SELECT xy,zz,y FROM `foobar` ORDER BY zy", "operation":"select", "table":"foobar"},
{"input":"SELECT `xy`,`zz`,y FROM foobar", "operation":"select", "table":"foobar"},
{"input":"SELECT Name FROM `world`.`City` WHERE Population > ?", "operation":"select", "table":"City"},
{"input":"SELECT frok FROM `world`.`City` WHERE Population > ?", "operation":"select", "table":"City"},
{"input":"SELECT irom FROM `world`.`City` WHERE Population > ?", "operation":"select", "table":"City"},
{"input":"SELECT\n\nirom\n\nFROM `world`.`City` WHERE Population > ?", "operation":"select", "table":"City"},
{"input":"SELECT\n\t irom\n FROM `world`.`City` WHERE Population > ?", "operation":"select", "table":"City"},
{"input":"SELECT fromm FROM `world`.`City` WHERE Population > ?", "operation":"select", "table":"City"},
{"input":"SELECT * FROM foo,bar", "operation":"select", "table":"foo"},
{"input":" \tSELECT * from \"foo\" WHERE a = b", "operation":"select", "table":"foo"},
{"input":" \tSELECT * \t from \"bar\" WHERE a = b", "operation":"select", "table":"bar"},
{"input":"SELECT * FROM(SELECT * FROM foobar) WHERE x > y", "operation":"select", "table":"(subquery)"},
{"input":"SELECT FROM_UNIXTIME() from \"bar\"", "operation":"select", "table":"bar"},
{"input":"SELECT ffrom from \"frome\"", "operation":"select", "table":"frome"},
{"input":"SELECT ffrom from (\"frome\")", "operation":"select", "table":"frome"},
{"input":"UPDATE abc SET x=1, y=2", "operation":"update", "table":"abc"},
{"input":"UPDATE\nabc\nSET x=1, y=2", "operation":"update", "table":"abc"},
{"input":" \tUPDATE abc SET ffrom='iinto'", "operation":"update", "table":"abc"},
{"input":" \tUPDATE 'abc' SET ffrom='iinto'", "operation":"update", "table":"abc"},
{"input":" \tUPDATE `abc` SET ffrom='iinto'", "operation":"update", "table":"abc"},
{"input":" \tUPDATE \"abc\" SET ffrom='iinto'", "operation":"update", "table":"abc"},
{"input":" \tUPDATE\r\tabc SET ffrom='iinto'", "operation":"update", "table":"abc"},
{"input":"INSERT INTO foobar (x,y) VALUES (1,2)", "operation":"insert", "table":"foobar"},
{"input":"INSERT\nINTO\nfoobar (x,y) VALUES (1,2)", "operation":"insert", "table":"foobar"},
{"input":"INSERT INTO foobar(x,y) VALUES (1,2)", "operation":"insert", "table":"foobar"},
{"input":" /* a */ SELECT * FROM alpha", "operation":"select", "table":"alpha"},
{"input":"SELECT /* a */ * FROM alpha", "operation":"select", "table":"alpha"},
{"input":"SELECT\n/* a */ *\nFROM alpha", "operation":"select", "table":"alpha"},
{"input":"SELECT * /* a */ FROM alpha", "operation":"select", "table":"alpha"},
{"input":"SELECT * FROM /* a */ alpha", "operation":"select", "table":"alpha"},
{"input":"/* X */ SELECT /* Y */ foo/**/ FROM /**/alpha/**/", "operation":"select", "table":"alpha"}
]