forked from phpmyadmin/sql-parser
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fixes phpmyadmin#202 - Fixes phpmyadmin#412 - Fixes phpmyadmin#492 - Closes phpmyadmin#499 - Related to phpmyadmin#172 Signed-off-by: Maurício Meneghini Fauth <[email protected]>
- Loading branch information
1 parent
ec459f7
commit 74504c5
Showing
12 changed files
with
1,607 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
update tbl_customer t set t.`description`=:yp where t.id=1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,284 @@ | ||
{ | ||
"query": "update tbl_customer t set t.`description`=:yp where t.id=1;", | ||
"lexer": { | ||
"@type": "PhpMyAdmin\\SqlParser\\Lexer", | ||
"str": "update tbl_customer t set t.`description`=:yp where t.id=1;", | ||
"len": 59, | ||
"last": 59, | ||
"list": { | ||
"@type": "PhpMyAdmin\\SqlParser\\TokensList", | ||
"tokens": [ | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": "update", | ||
"value": "UPDATE", | ||
"keyword": "UPDATE", | ||
"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": "tbl_customer", | ||
"value": "tbl_customer", | ||
"keyword": null, | ||
"type": 0, | ||
"flags": 0, | ||
"position": 7 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": " ", | ||
"value": " ", | ||
"keyword": null, | ||
"type": 3, | ||
"flags": 0, | ||
"position": 19 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": "t", | ||
"value": "t", | ||
"keyword": null, | ||
"type": 0, | ||
"flags": 0, | ||
"position": 20 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": " ", | ||
"value": " ", | ||
"keyword": null, | ||
"type": 3, | ||
"flags": 0, | ||
"position": 21 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": "set", | ||
"value": "SET", | ||
"keyword": "SET", | ||
"type": 1, | ||
"flags": 11, | ||
"position": 22 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": " ", | ||
"value": " ", | ||
"keyword": null, | ||
"type": 3, | ||
"flags": 0, | ||
"position": 25 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": "t", | ||
"value": "t", | ||
"keyword": null, | ||
"type": 0, | ||
"flags": 0, | ||
"position": 26 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": ".", | ||
"value": ".", | ||
"keyword": null, | ||
"type": 2, | ||
"flags": 16, | ||
"position": 27 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": "`description`", | ||
"value": "description", | ||
"keyword": null, | ||
"type": 8, | ||
"flags": 2, | ||
"position": 28 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": "=", | ||
"value": "=", | ||
"keyword": null, | ||
"type": 2, | ||
"flags": 2, | ||
"position": 41 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": ":yp", | ||
"value": "yp", | ||
"keyword": null, | ||
"type": 8, | ||
"flags": 16, | ||
"position": 42 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": " ", | ||
"value": " ", | ||
"keyword": null, | ||
"type": 3, | ||
"flags": 0, | ||
"position": 45 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": "where", | ||
"value": "WHERE", | ||
"keyword": "WHERE", | ||
"type": 1, | ||
"flags": 3, | ||
"position": 46 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": " ", | ||
"value": " ", | ||
"keyword": null, | ||
"type": 3, | ||
"flags": 0, | ||
"position": 51 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": "t", | ||
"value": "t", | ||
"keyword": null, | ||
"type": 0, | ||
"flags": 0, | ||
"position": 52 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": ".", | ||
"value": ".", | ||
"keyword": null, | ||
"type": 2, | ||
"flags": 16, | ||
"position": 53 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": "id", | ||
"value": "id", | ||
"keyword": null, | ||
"type": 0, | ||
"flags": 0, | ||
"position": 54 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": "=", | ||
"value": "=", | ||
"keyword": null, | ||
"type": 2, | ||
"flags": 2, | ||
"position": 56 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": "1", | ||
"value": 1, | ||
"keyword": null, | ||
"type": 6, | ||
"flags": 0, | ||
"position": 57 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": ";", | ||
"value": ";", | ||
"keyword": null, | ||
"type": 9, | ||
"flags": 0, | ||
"position": 58 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": null, | ||
"value": null, | ||
"keyword": null, | ||
"type": 9, | ||
"flags": 0, | ||
"position": null | ||
} | ||
], | ||
"count": 23, | ||
"idx": 23 | ||
}, | ||
"delimiter": ";", | ||
"delimiterLen": 1, | ||
"strict": false, | ||
"errors": [] | ||
}, | ||
"parser": { | ||
"@type": "PhpMyAdmin\\SqlParser\\Parser", | ||
"list": { | ||
"@type": "@1" | ||
}, | ||
"statements": [ | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Statements\\UpdateStatement", | ||
"tables": [ | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", | ||
"database": null, | ||
"table": "tbl_customer", | ||
"column": null, | ||
"expr": "tbl_customer", | ||
"alias": "t", | ||
"function": null, | ||
"subquery": null | ||
} | ||
], | ||
"set": [ | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Components\\SetOperation", | ||
"column": "t.`description`", | ||
"value": ":yp" | ||
} | ||
], | ||
"where": [ | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Components\\Condition", | ||
"identifiers": [ | ||
"t", | ||
"id" | ||
], | ||
"isOperator": false, | ||
"expr": "t.id=1" | ||
} | ||
], | ||
"order": null, | ||
"limit": null, | ||
"join": null, | ||
"options": { | ||
"@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", | ||
"options": [] | ||
}, | ||
"first": 0, | ||
"last": 20 | ||
} | ||
], | ||
"brackets": 0, | ||
"strict": false, | ||
"errors": [] | ||
}, | ||
"errors": { | ||
"lexer": [], | ||
"parser": [] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
SELECT 1, 2, ?, 3 |
Oops, something went wrong.