Rules Hub
Coding Rules Library
← Back to all rules
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
backend ruleP2stack specificStack: MySQL / SQL
sqlmysqlperformancesimplicity
Do not wrap LIKE in LOWER() when the collation is already case-insensitive
MySQL's LIKE is case-insensitive by default under typical collations; wrapping both sides in LOWER() adds complexity and can defeat indexes for no benefit.
PR: hegnar-shareholders-ws · org-mining-hist-2026-06Created: Jun 18, 2026
Bad example
Old codesql
| 1 | WHERE LOWER(symbol) LIKE LOWER(:search) |
Explanation (EN)
Objašnjenje (HR)
Good example
New codesql
| 1 | WHERE symbol LIKE :search |
Explanation (EN)
Objašnjenje (HR)