-
-
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
Remove nullability from IndexHint #616
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
be59469
to
aec2309
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #616 +/- ##
============================================
- Coverage 96.81% 96.26% -0.56%
+ Complexity 2303 2254 -49
============================================
Files 71 89 +18
Lines 5250 5091 -159
============================================
- Hits 5083 4901 -182
- Misses 167 190 +23 ☔ View full report in Codecov by Sentry. |
@@ -252,7 +252,7 @@ | |||
{ | |||
"@type": "PhpMyAdmin\\SqlParser\\Components\\IndexHint", | |||
"type": "FORCE", | |||
"indexOrKey": null, | |||
"indexOrKey": "", |
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.
I guess that's a bit less intuitive for developers
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.
How so? Either way, it's an invalid value. The developer should check the parser errors. The only valid values for this are INDEX
or KEY
.
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.
Oh okay, it's empty but the parser would have errors
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.
But all okay
This confused me but I checked the documentation and it turns out that neither $type nor $indexOrKey can be null. https://dev.mysql.com/doc/refman/8.4/en/index-hints.html