There is presently no easy way to query the minimum/maximum values of a given column - at the database level - by leveraging query sets. In order to palliate this, let's add new #minimum and #maximum methods to the base query set implementation. These new methods should take the name of a field for which the minimum/maximum value should be queried.
Description
There is presently no easy way to query the minimum/maximum values of a given column - at the database level - by leveraging query sets. In order to palliate this, let's add new
#minimum
and#maximum
methods to the base query set implementation. These new methods should take the name of a field for which the minimum/maximum value should be queried.For example:
These methods should also be available from model classes directly: