Summary: |
|
||||||
---|---|---|---|---|---|---|---|
Description: |
|
[Gravity] Integrate mysqli_get_warnings() in the result object for mysql/mariadb queries
Review Request #793 — Created Sept. 9, 2021 and submitted
Information | |
---|---|
b.stoop | |
Lunr | |
796 | |
96d04bd... | |
Reviewers | |
lunr | |
Integrate mysqli_get_warnings() in the result object for mysql/mariadb queries
Wrote script to test if it's working locally and made unit tests
-
-
src/Lunr/Gravity/Database/MySQL/MySQLQueryResult.php (Diff revision 2) This looks like something you want to do once, not on every call to the method.
-
-
-
src/Lunr/Gravity/Database/MySQL/MySQLQueryResult.php (Diff revision 4) mixed
is for examplemysqli_warning|bool|int
mysqli_warning|null
is declared as?mysqli_warning
Testing Done: |
|
||||||
---|---|---|---|---|---|---|---|
Diff: |
Revision 5 (+44) |
||||||
Added Files: |
Testing Done: |
|
||||||
---|---|---|---|---|---|---|---|
Diff: |
Revision 6 (+385) |
||||||
Removed Files: |
Change Summary:
Improved unit test
-
Looking good :)
Minor tweaks here and there
-
src/Lunr/Gravity/Database/MySQL/MySQLQueryResult.php (Diff revision 7) Try to be specific in your checks. We read
!
as!== TRUE
and while that checks out here, it's not immediately obvious. By being explicit you make it clear that we check a boolean value here. -
src/Lunr/Gravity/Database/MySQL/MySQLQueryResult.php (Diff revision 7) We like what we call "early exits". You can put a return statement inside the if. That way you can drop the else clause and save one indentation level for the do-while loop.
-
src/Lunr/Gravity/Database/MySQL/Tests/MySQLQueryResultWarningTest.php (Diff revision 7) use the helper method :)
get_reflection_property_value()
-
Change Summary:
Proccessed feedback
Diff: |
Revision 8 (+344)
|
---|
Change Summary:
Rebase from review #799
Summary: |
|
||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 9 (+346)
|
-
-
src/Lunr/Gravity/Database/MySQL/MySQLQueryResult.php (Diff revision 9) shouldn't be public, make it protected
-
src/Lunr/Gravity/Database/MySQL/Tests/MockMySQLiSuccessfulConnection.php (Diff revision 9) Superfluous
-
-
-
Change Summary:
Feedback processing
Commit: |
|
||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 10 (+340)
|
Change Summary:
rebase
Commit: |
|
||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 11 (+340)
|
Change Summary:
Edited @copyright
Commit: |
|
||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 12 (+340)
|