Fix simulate query #2#18670
Merged
MauricioFauth merged 2 commits intophpmyadmin:QA_5_2from Oct 3, 2023
Merged
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## QA_5_2 #18670 +/- ##
============================================
- Coverage 48.47% 47.95% -0.52%
Complexity 17012 17012
============================================
Files 607 607
Lines 72340 72334 -6
============================================
- Hits 35065 34689 -376
- Misses 37275 37645 +370
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
7323c7b to
22faf9b
Compare
| $newValues = []; | ||
| $oldValues = []; | ||
|
|
||
| preg_match('/^(?:`([^`]+)`\.)?`([^`]+)`$/i', $tableReferences[0], $matches); |
Contributor
There was a problem hiding this comment.
It would be nice to have a comment for this regex.
williamdes
reviewed
Aug 29, 2023
22faf9b to
c972deb
Compare
- Did not work when setting value to other column value, e.g. `SET a=a+1` - Show updated data when clicking on the affected rows number Now shows all table columns plus the new value as a column Signed-off-by: Maximilian Krög <maxi_kroeg@web.de>
The button now also appears when using an update statement that uses schema.table format, and delete statements like `DELETE a FROM a ...` Signed-off-by: Maximilian Krög <maxi_kroeg@web.de>
c972deb to
5d9f5c7
Compare
MoonE
commented
Aug 29, 2023
| $newValues[] = $set->value . ' AS ' . ($newColumns[] = Util::backquote('n' . $i)); | ||
| ++$i; | ||
| $oldColumns[] = Util::backquote($column); | ||
| $values[$column] = $set->value . ' AS ' . ($newColumns[] = Util::backquote($column . ' `new`')); |
Contributor
Author
There was a problem hiding this comment.
This is less complex compared to that, with the caveat that the old and new value columns are not next to each other and if someone has a table with column pairs named [x] and [x] `new` it breaks.
MauricioFauth
approved these changes
Oct 3, 2023
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.
Allows showing the updated values by clicking on the affected row number #18583 (comment).
SET a=a+1Now shows all table columns plus the new value as a column
and delete statements like
DELETE a FROM a ...