nette/database

Aggregations functions return type

Opened this issue · 3 comments

  • bug report? yes
  • feature request? no
  • version: 3.0.0-alpha

Description

Selection aggregations function have return type int but should be able to return null or int.

Steps To Reproduce

max() min() on empty table atc.

Or I can call aggregation on string column.
$selection->min('myStringColumn')

dg commented

Can you send PR?

Actually I am not sure what is right if it also works with strings atc. Remove return type completely?