Filter SQL queries - #4064
Filter SQL queries#4064
Conversation
(ie "fetchPair", "fetchObject", etc.. not just "perform")
When no URL, the query returns a null and number_format() throws a deprecation notice Much cleaner to return integers anyway.
Sufficient for the unit tests and compatible with more DB engines
LeoColomb
left a comment
There was a problem hiding this comment.
Quite a big chunk to review! 😅
Seems pretty fair on the principle.
That said, is it really needed to reimplement all parent class fetch functions?
As they all call perform() anyway, wouldn't it be just good enough to override this one to include the filter?
|
Thanks for reviewing !! Legit question. The answer is that the |
|
AI answer, right? 😅 |
|
Nope, my own words :) Regarding the other debugbacktrace : I was relunctant to use it but couldn't find another way. Eventually used it because it's only used when debug is true. In perform it would be always active, which I thought would be a bad idea |
|
Is there anything, or anything else, that I may clarify to move on with this PR? |
This one is neat.
It introduces the ability to filter SQL query statements, or completely bypass
fetch*methods.Practical uses :
Postgresql plugin functional :

Cache plugin functional, support APCu, Redis, Memcache, or writing to disk
