phalcon / cphalcon

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

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

Open dz3n opened 8 months ago

dz3n commented 8 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 8 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