Remove nullability from IndexHint#616
Merged
MauricioFauth merged 1 commit intophpmyadmin:masterfrom Feb 20, 2025
Merged
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. |
williamdes
reviewed
Feb 9, 2025
| "@type": "PhpMyAdmin\\SqlParser\\Components\\IndexHint", | ||
| "type": "FORCE", | ||
| "indexOrKey": null, | ||
| "indexOrKey": "", |
Member
There was a problem hiding this comment.
I guess that's a bit less intuitive for developers
Contributor
Author
There was a problem hiding this comment.
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.
Member
There was a problem hiding this comment.
Oh okay, it's empty but the parser would have errors
MauricioFauth
approved these changes
Feb 20, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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