-
-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding over
keyword to the contexts and modify the Expression
allowed keywords
#360
Conversation
7dd39fe
to
9d7ee01
Compare
Signed-off-by: Fawzi E. Abdulfattah <iifawzie@gmail.com>
9d7ee01
to
53f44fa
Compare
Codecov Report
@@ Coverage Diff @@
## master #360 +/- ##
=========================================
Coverage 95.49% 95.49%
Complexity 2023 2023
=========================================
Files 67 67
Lines 4332 4332
=========================================
Hits 4137 4137
Misses 195 195
Continue to review full report at Codecov.
|
Regarding a test for this, I couldn't find a way to use a specific context while generating the parser's test output. This's needed because the keyword is not present in the default context being used (5.7.0), which will lead to parse it incorrectly, Is there a way @williamdes? I've tried changing the default context, and it worked, but the CI tests would fail then. Anyway, I've made a fake integration with PhpMyAdmin and it also worked. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
The PR would fix this issue too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
Ready for a merge, tests can be added in another PR then
Signed-off-by: William Desportes <williamdes@wdes.fr>
I did some kind of adjustment to be able to load contexts depending on the file name, it looks like ANSI cases would be using a similar system See: 79f555a |
Looks so neat, I’m just thinking of also supporting specifying mysql context Maybe: $mysqlDbPos = strpos($input, '_mysqldb_');
elseif ($mysqlDbPos !== false) {
$mysqlDbVersion = (int) substr($name, $mysqlDbPos + 9, 6);
Context::load('MySqlDb' . $mysqlDbPos);
} |
Sure, as soon as one test case uses it, yo avoid dead code |
Signed-off-by: William Desportes <williamdes@wdes.fr>
Signed-off-by: Fawzi E. Abdulfattah iifawzie@gmail.com
Hi, This PR should fix phpmyadmin/phpmyadmin#17126.
Context references:
https://dev.mysql.com/doc/refman/8.0/en/keywords.html
https://mariadb.com/kb/en/reserved-words/
I've created the PR against the
master
branch, because some contexts are not exist on theQA
branch.