atk4 / data

Data Access PHP Framework for SQL & high-latency databases
https://atk4-data.readthedocs.io
MIT License
273 stars 46 forks source link

Add Model::executeCountQuery() method #1008

Closed mvorisek closed 2 years ago

mvorisek commented 2 years ago

after a long discussion, I propose Model::executeCountQuery name

I do not want to name it Model::getCount, as such name might imply it is stored and/or no query is sent to the DB

it is not only shorter than $m->action('count')->getOne() but the value is also casted properly to an integer