nette / database

💾 A database layer with a familiar PDO-like API but much more powerful. Building queries, advanced joins, drivers for MySQL, PostgreSQL, SQLite, MS SQL Server and Oracle.
https://doc.nette.org/database
Other
492 stars 105 forks source link

TypeError Nette\Database\Table\Selection::count(): Return value must be of type int, string returned #280

Closed forgie1 closed 3 years ago

forgie1 commented 3 years ago

Version: 3.1.3

Bug Description

Should return count not end in error.

Steps To Reproduce

`$selection->count('DISTINCT relatedTable.column');

Possible Solution

\Nette\Database\Table\Selection::497 return (int)$this->aggregation("COUNT($column)");