yiisoft / db

Yii Database Library
https://www.yiiframework.com/
BSD 3-Clause "New" or "Revised" License
134 stars 35 forks source link

Refactor `Quoter` #756

Closed Tigrov closed 1 year ago

Tigrov commented 1 year ago
  1. Added used function to use function block
  2. Replaced str_contains() with str_starts_with()
  3. Removed unnecessary chars from patterns of regular expression
  4. Fixed bug of quoteSql() for sql containing table with prefix (test)
  5. Fixed bug of getTableNameParts() for cases with different quotes for tables and columns (test)
  6. Fixed bug of quoteTableName() for sub-query with alias (test)
Q A
Is bugfix? ✔️
New feature?
Breaks BC?
Fixed issues -
what-the-diff[bot] commented 1 year ago

PR Summary

codecov[bot] commented 1 year ago

Codecov Report

All modified lines are covered by tests :white_check_mark:

Comparison is base (fb4c084) 99.73% compared to head (63bccfb) 99.73%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #756 +/- ## ========================================= Coverage 99.73% 99.73% + Complexity 1269 1268 -1 ========================================= Files 63 63 Lines 3038 3045 +7 ========================================= + Hits 3030 3037 +7 Misses 8 8 ``` | [Files](https://app.codecov.io/gh/yiisoft/db/pull/756?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yiisoft) | Coverage Δ | | |---|---|---| | [src/Schema/Quoter.php](https://app.codecov.io/gh/yiisoft/db/pull/756?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yiisoft#diff-c3JjL1NjaGVtYS9RdW90ZXIucGhw) | `100.00% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.