phalcon / cphalcon

High performance, full-stack PHP framework delivered as a C extension.
https://phalcon.io
BSD 3-Clause "New" or "Revised" License
10.78k stars 1.97k forks source link

[NFR]: Resetting query filters for query builder #16555

Open dz3n opened 6 months ago

dz3n commented 6 months ago

Describe the solution you'd like In version 5.6.0 resetColumns(), resetFrom(), resetWhere(), resetGroupBy(), resetHaving(), resetOrderBy(), resetLimit(), resetFlags() were added to Phalcon\Datamapper\Query\AbstractQuery which are really useful options in certain scenarios.

Please consider adding the same methods for Phalcon\Mvc\Model\Query\Builder

niden commented 6 months ago

This is going to be tough for having and where, since they use the same arrays to store the bindparams and bindtypes. The rest are easy to implement.

I need to see if I can split those two to be able to get this to work