summaryrefslogtreecommitdiff
path: root/django/contrib/postgres/aggregates/statistics.py
AgeCommit message (Collapse)Author
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2021-09-29Fixed #33141 -- Renamed Expression.empty_aggregate_value to ↵David Wobrock
empty_result_set_value.
2021-07-19Fixed #10929 -- Added default argument to aggregates.Nick Pope
Thanks to Simon Charette and Adam Johnson for the reviews.
2021-07-02Refs #26430 -- Re-introduced empty aggregation optimization.Simon Charette
The introduction of the Expression.empty_aggregate_value interface allows the compilation stage to enable the EmptyResultSet optimization if all the aggregates expressions implement it. This also removes unnecessary RegrCount/Count.convert_value() methods. Disabling the empty result set aggregation optimization when it wasn't appropriate prevented None returned for a Count aggregation value. Thanks Nick Pope for the review.
2020-02-04Simplified imports from django.db and django.contrib.gis.db.Nick Pope
2019-08-08Removed unnecessary StatAggregate.resolve_expression().Jon Dufresne
This method only calls the parent method, but without the for_save argument. The parent class, Aggregate, already ignores the for_save argument so there is no need for special handling. Unnecessary since its introduction in e4cf8c8420634d6f2dc8ce873246256ce635972d.
2017-09-16Simplified Count.convert_value() and RegrCount.convert_value().Sergey Fedoseev
2017-09-11Fixed #28492 -- Defined default output_field of expressions at the class level.Simon Charette
This wasn't possible when settings were accessed during Field initialization time as our test suite setup script was triggering imports of expressions before settings were configured.
2017-08-12Fixed #27849 -- Added filtering support to aggregates.Tom
2017-07-20Fixed #28370 -- Deprecated the context arg of Field.from_db_value() and ↵Tim Graham
Expression.convert_value(). Unused since a0d166306fbdc41f49e6fadf4ec84b17eb147daa.
2017-03-23Simplified handling of expressions in StatAggregate.Sergey Fedoseev
2017-01-25Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand
2015-03-30Fixed #24301 -- Added PostgreSQL-specific aggregate functionsAndriy Sokolovskiy