github.com/lulzWill/go-agent@v2.1.2+incompatible/internal/crossagent/cross_agent_tests/sql_parsing.json (about)

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