{
    "query": "SELECT * FROM foo WHERE\nSELECT * FROM foo WHERE\n\nSTART TRANSACTION;\n\nCREATE TABLE `tb` (`uid` INT UNSIGNED NOT NULL\n`position` INT NOT NULL,\nPRIMARY KEY ( `uid` ) ,\nINDEX ( `position` )\n) ENGINE = InnoDB;\n\nCOMMIT;",
    "lexer": {
        "@type": "PhpMyAdmin\\SqlParser\\Lexer",
        "str": "SELECT * FROM foo WHERE\nSELECT * FROM foo WHERE\n\nSTART TRANSACTION;\n\nCREATE TABLE `tb` (`uid` INT UNSIGNED NOT NULL\n`position` INT NOT NULL,\nPRIMARY KEY ( `uid` ) ,\nINDEX ( `position` )\n) ENGINE = InnoDB;\n\nCOMMIT;",
        "len": 213,
        "last": 213,
        "list": {
            "@type": "PhpMyAdmin\\SqlParser\\TokensList",
            "tokens": [
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "SELECT",
                    "value": "SELECT",
                    "keyword": "SELECT",
                    "type": 1,
                    "flags": 3,
                    "position": 0
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 6
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "*",
                    "value": "*",
                    "keyword": null,
                    "type": 2,
                    "flags": 16,
                    "position": 7
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 8
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "FROM",
                    "value": "FROM",
                    "keyword": "FROM",
                    "type": 1,
                    "flags": 3,
                    "position": 9
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 13
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "foo",
                    "value": "foo",
                    "keyword": null,
                    "type": 0,
                    "flags": 0,
                    "position": 14
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 17
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "WHERE",
                    "value": "WHERE",
                    "keyword": "WHERE",
                    "type": 1,
                    "flags": 3,
                    "position": 18
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "\n",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 23
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "SELECT",
                    "value": "SELECT",
                    "keyword": "SELECT",
                    "type": 1,
                    "flags": 3,
                    "position": 24
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 30
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "*",
                    "value": "*",
                    "keyword": null,
                    "type": 2,
                    "flags": 16,
                    "position": 31
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 32
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "FROM",
                    "value": "FROM",
                    "keyword": "FROM",
                    "type": 1,
                    "flags": 3,
                    "position": 33
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 37
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "foo",
                    "value": "foo",
                    "keyword": null,
                    "type": 0,
                    "flags": 0,
                    "position": 38
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 41
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "WHERE",
                    "value": "WHERE",
                    "keyword": "WHERE",
                    "type": 1,
                    "flags": 3,
                    "position": 42
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "\n\n",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 47
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "START TRANSACTION",
                    "value": "START TRANSACTION",
                    "keyword": "START TRANSACTION",
                    "type": 1,
                    "flags": 7,
                    "position": 49
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": ";",
                    "value": ";",
                    "keyword": null,
                    "type": 9,
                    "flags": 0,
                    "position": 66
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "\n\n",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 67
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "CREATE",
                    "value": "CREATE",
                    "keyword": "CREATE",
                    "type": 1,
                    "flags": 3,
                    "position": 69
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 75
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "TABLE",
                    "value": "TABLE",
                    "keyword": "TABLE",
                    "type": 1,
                    "flags": 3,
                    "position": 76
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 81
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "`tb`",
                    "value": "tb",
                    "keyword": null,
                    "type": 8,
                    "flags": 2,
                    "position": 82
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 86
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "(",
                    "value": "(",
                    "keyword": null,
                    "type": 2,
                    "flags": 16,
                    "position": 87
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "`uid`",
                    "value": "uid",
                    "keyword": null,
                    "type": 8,
                    "flags": 2,
                    "position": 88
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 93
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "INT",
                    "value": "INT",
                    "keyword": "INT",
                    "type": 1,
                    "flags": 11,
                    "position": 94
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 97
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "UNSIGNED",
                    "value": "UNSIGNED",
                    "keyword": "UNSIGNED",
                    "type": 1,
                    "flags": 3,
                    "position": 98
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 106
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "NOT NULL",
                    "value": "NOT NULL",
                    "keyword": "NOT NULL",
                    "type": 1,
                    "flags": 7,
                    "position": 107
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "\n",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 115
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "`position`",
                    "value": "position",
                    "keyword": null,
                    "type": 8,
                    "flags": 2,
                    "position": 116
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 126
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "INT",
                    "value": "INT",
                    "keyword": "INT",
                    "type": 1,
                    "flags": 11,
                    "position": 127
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 130
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "NOT NULL",
                    "value": "NOT NULL",
                    "keyword": "NOT NULL",
                    "type": 1,
                    "flags": 7,
                    "position": 131
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": ",",
                    "value": ",",
                    "keyword": null,
                    "type": 2,
                    "flags": 16,
                    "position": 139
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "\n",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 140
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "PRIMARY KEY",
                    "value": "PRIMARY KEY",
                    "keyword": "PRIMARY KEY",
                    "type": 1,
                    "flags": 23,
                    "position": 141
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 152
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "(",
                    "value": "(",
                    "keyword": null,
                    "type": 2,
                    "flags": 16,
                    "position": 153
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 154
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "`uid`",
                    "value": "uid",
                    "keyword": null,
                    "type": 8,
                    "flags": 2,
                    "position": 155
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 160
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": ")",
                    "value": ")",
                    "keyword": null,
                    "type": 2,
                    "flags": 16,
                    "position": 161
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 162
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": ",",
                    "value": ",",
                    "keyword": null,
                    "type": 2,
                    "flags": 16,
                    "position": 163
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "\n",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 164
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "INDEX",
                    "value": "INDEX",
                    "keyword": "INDEX",
                    "type": 1,
                    "flags": 19,
                    "position": 165
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 170
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "(",
                    "value": "(",
                    "keyword": null,
                    "type": 2,
                    "flags": 16,
                    "position": 171
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 172
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "`position`",
                    "value": "position",
                    "keyword": null,
                    "type": 8,
                    "flags": 2,
                    "position": 173
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 183
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": ")",
                    "value": ")",
                    "keyword": null,
                    "type": 2,
                    "flags": 16,
                    "position": 184
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "\n",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 185
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": ")",
                    "value": ")",
                    "keyword": null,
                    "type": 2,
                    "flags": 16,
                    "position": 186
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 187
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "ENGINE",
                    "value": "ENGINE",
                    "keyword": "ENGINE",
                    "type": 1,
                    "flags": 1,
                    "position": 188
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 194
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "=",
                    "value": "=",
                    "keyword": null,
                    "type": 2,
                    "flags": 2,
                    "position": 195
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 196
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "InnoDB",
                    "value": "InnoDB",
                    "keyword": null,
                    "type": 0,
                    "flags": 0,
                    "position": 197
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": ";",
                    "value": ";",
                    "keyword": null,
                    "type": 9,
                    "flags": 0,
                    "position": 203
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "\n\n",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 204
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "COMMIT",
                    "value": "COMMIT",
                    "keyword": "COMMIT",
                    "type": 1,
                    "flags": 1,
                    "position": 206
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": ";",
                    "value": ";",
                    "keyword": null,
                    "type": 9,
                    "flags": 0,
                    "position": 212
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": null,
                    "value": null,
                    "keyword": null,
                    "type": 9,
                    "flags": 0,
                    "position": null
                }
            ],
            "count": 75,
            "idx": 75
        },
        "delimiter": ";",
        "delimiterLen": 1,
        "strict": false,
        "errors": []
    },
    "parser": {
        "@type": "PhpMyAdmin\\SqlParser\\Parser",
        "list": {
            "@type": "@1"
        },
        "statements": [
            {
                "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement",
                "expr": [
                    {
                        "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression",
                        "database": null,
                        "table": null,
                        "column": null,
                        "expr": "*",
                        "alias": null,
                        "function": null,
                        "subquery": null
                    }
                ],
                "from": [
                    {
                        "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression",
                        "database": null,
                        "table": "foo",
                        "column": null,
                        "expr": "foo",
                        "alias": null,
                        "function": null,
                        "subquery": null
                    }
                ],
                "index_hints": null,
                "partition": null,
                "where": [],
                "group": null,
                "group_options": null,
                "having": null,
                "order": null,
                "limit": null,
                "procedure": null,
                "into": null,
                "join": null,
                "union": [],
                "end_options": null,
                "options": {
                    "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray",
                    "options": []
                },
                "first": 0,
                "last": 9
            },
            {
                "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement",
                "expr": [
                    {
                        "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression",
                        "database": null,
                        "table": null,
                        "column": null,
                        "expr": "*",
                        "alias": null,
                        "function": null,
                        "subquery": null
                    }
                ],
                "from": [
                    {
                        "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression",
                        "database": null,
                        "table": "foo",
                        "column": null,
                        "expr": "foo",
                        "alias": null,
                        "function": null,
                        "subquery": null
                    }
                ],
                "index_hints": null,
                "partition": null,
                "where": [],
                "group": null,
                "group_options": null,
                "having": null,
                "order": null,
                "limit": null,
                "procedure": null,
                "into": null,
                "join": null,
                "union": [],
                "end_options": null,
                "options": {
                    "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray",
                    "options": []
                },
                "first": 10,
                "last": 19
            },
            {
                "@type": "PhpMyAdmin\\SqlParser\\Statements\\TransactionStatement",
                "type": 1,
                "statements": [
                    {
                        "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement",
                        "name": {
                            "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression",
                            "database": null,
                            "table": "tb",
                            "column": null,
                            "expr": "`tb`",
                            "alias": null,
                            "function": null,
                            "subquery": null
                        },
                        "entityOptions": {
                            "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray",
                            "options": []
                        },
                        "fields": [
                            {
                                "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition",
                                "name": "uid",
                                "isConstraint": null,
                                "type": {
                                    "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType",
                                    "name": "INT",
                                    "parameters": [],
                                    "options": {
                                        "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray",
                                        "options": {
                                            "4": "UNSIGNED"
                                        }
                                    }
                                },
                                "key": null,
                                "references": null,
                                "options": {
                                    "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray",
                                    "options": {
                                        "1": "NOT NULL"
                                    }
                                }
                            }
                        ],
                        "with": null,
                        "select": null,
                        "like": null,
                        "partitionBy": null,
                        "partitionsNum": null,
                        "subpartitionBy": null,
                        "subpartitionsNum": null,
                        "partitions": null,
                        "table": null,
                        "return": null,
                        "parameters": null,
                        "body": [],
                        "options": {
                            "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray",
                            "options": {
                                "6": "TABLE"
                            }
                        },
                        "first": 21,
                        "last": 47
                    }
                ],
                "end": {
                    "@type": "PhpMyAdmin\\SqlParser\\Statements\\TransactionStatement",
                    "type": 2,
                    "statements": null,
                    "end": null,
                    "options": {
                        "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray",
                        "options": {
                            "1": "COMMIT"
                        }
                    },
                    "first": 72,
                    "last": 72
                },
                "options": {
                    "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray",
                    "options": {
                        "1": "START TRANSACTION"
                    }
                },
                "first": 20,
                "last": 20
            }
        ],
        "brackets": 0,
        "strict": false,
        "errors": []
    },
    "errors": {
        "lexer": [],
        "parser": [
            [
                "This type of clause was previously parsed.",
                {
                    "@type": "@12"
                },
                0
            ],
            [
                "A new statement was found, but no delimiter between it and the previous one.",
                {
                    "@type": "@22"
                },
                0
            ],
            [
                "A comma or a closing bracket was expected.",
                {
                    "@type": "@40"
                },
                0
            ],
            [
                "Unexpected beginning of statement.",
                {
                    "@type": "@51"
                },
                0
            ],
            [
                "Unrecognized statement type.",
                {
                    "@type": "@57"
                },
                0
            ]
        ]
    }
}