Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fixed #34176 -- Fixed grouping by ambiguous aliases. | Simon Charette | 2023-01-09 | 2 | -3/+133 |
| | | | | | | | | | | | | | | | Regression in b7b28c7c189615543218e81319473888bc46d831. Refs #31377. Thanks Shai Berger for the report and reviews. test_aggregation_subquery_annotation_values_collision() has been updated as queries that are explicitly grouped by a subquery should always be grouped by it and not its outer columns even if its alias collides with referenced table columns. This was not possible to accomplish at the time 10866a10 landed because we didn't have compiler level handling of colliding aliases. | ||||
* | Refs #17144 -- Removed support for grouping by primary key. | Simon Charette | 2022-11-07 | 1 | -9/+5 |
| | | | | | No core backend require the feature anymore as it was only added to support a MySQL'ism that has been deprecated since then. | ||||
* | Refs #33990 -- Renamed TransactionTestCase.assertQuerysetEqual() to ↵ | Gregor Gärtner | 2022-10-08 | 1 | -26/+26 |
| | | | | | | assertQuerySetEqual(). Co-Authored-By: Michael Howitz <mh@gocept.com> | ||||
* | Replaced assertQuerysetEqual() to assertSequenceEqual()/assertCountEqual() ↵ | Mariusz Felisiak | 2022-10-07 | 1 | -2/+2 |
| | | | | | where appropriate. Follow up to 3f7b3275627385f8f7531fca01cdda50d4ec6b6e. | ||||
* | Refs #33308 -- Enabled explicit GROUP BY and ORDER BY aliases. | Simon Charette | 2022-10-06 | 1 | -4/+13 |
| | | | | | | | This ensures explicit grouping from using values() before annotating an aggregate function groups by selected aliases if supported. The GROUP BY feature is disabled on Oracle because it doesn't support it. | ||||
* | Fixed #34024 -- Fixed crash when aggregating querysets with Q objects ↵ | David Sanders | 2022-09-23 | 1 | -0/+3 |
| | | | | | | | | | | | annotations. This reverts b64db05b9cedd96905d637a2d824cbbf428e40e7. It was reasonable to assume it was unnecessary code as there were no failing tests upon its removal. This commit adds the necessary regression tests for the failing condition identified in #34024 alongside the original tests added in the PR for which WhereNode.is_summary was introduced. | ||||
* | Relaxed some query ordering assertions in various tests. | Mariusz Felisiak | 2022-04-14 | 1 | -1/+1 |
| | | | It accounts for differences seen on MySQL with MyISAM storage engine. | ||||
* | Fixed #29865 -- Added logical XOR support for Q() and querysets. | Ryan Heard | 2022-03-04 | 1 | -0/+22 |
| | |||||
* | Refs #11293 -- Added test for filtering aggregates with negated & operator. | Mariusz Felisiak | 2022-03-04 | 1 | -1/+13 |
| | |||||
* | Removed redundant QuerySet.all() calls in docs and tests. | Nick Pope | 2022-02-22 | 1 | -10/+6 |
| | | | | Most QuerySet methods are mapped onto the Manager and, in general, it isn't necessary to call .all() on the manager. | ||||
* | Refs #33476 -- Refactored code to strictly match 88 characters line length. | Mariusz Felisiak | 2022-02-07 | 1 | -13/+30 |
| | |||||
* | Refs #33476 -- Reformatted code with Black. | django-bot | 2022-02-07 | 2 | -730/+975 |
| | |||||
* | Fixed #32690 -- Fixed __in lookup crash when combining with filtered aggregates. | Simon Charette | 2021-05-05 | 1 | -0/+8 |
| | | | | | | | | | | | Having lookups group by subquery right-hand-sides is likely unnecessary in the first place but relatively large amount of work would be needed to achieve that such as making Lookup instances proper resolvable expressions. Regression in 35431298226165986ad07e91f9d3aca721ff38ec. Thanks James A. Munsch for the report. | ||||
* | Fixed #32168 -- Removed serial pk assumption in aggregation_regress tests. | Christopher Wang | 2020-11-04 | 1 | -3/+5 |
| | |||||
* | Refs #32168 -- Fixed Publisher assertions in AggregationTests.test_more_more. | Christopher Wang | 2020-11-04 | 1 | -4/+4 |
| | | | | | | Refer to Publisher objects instead of Books. Test regression in 1bf25e9bc6df6c2ae4c0b10fb839e101471e8373. | ||||
* | Fixed #31910 -- Fixed crash of GIS aggregations over subqueries. | Simon Charette | 2020-11-04 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | | | | | | | | Regression was introduced by fff5186 but was due a long standing issue. AggregateQuery was abusing Query.subquery: bool by stashing its compiled inner query's SQL for later use in its compiler which made select_format checks for Query.subquery wrongly assume the provide query was a subquery. This patch prevents that from happening by using a dedicated inner_query attribute which is compiled at a later time by SQLAggregateCompiler. Moving the inner query's compilation to SQLAggregateCompiler.compile had the side effect of addressing a long standing issue with aggregation subquery pushdown which prevented converters from being run. This is now fixed as the aggregation_regress adjustments demonstrate. Refs #25367. Thanks Eran Keydar for the report. | ||||
* | Refs #30446 -- Removed unnecessary Value(..., output_field) in docs and tests. | Simon Charette | 2020-07-15 | 1 | -2/+2 |
| | |||||
* | Fixed #30446 -- Resolved Value.output_field for stdlib types. | Simon Charette | 2020-07-15 | 1 | -1/+1 |
| | | | | | | This required implementing a limited form of dynamic dispatch to combine expressions with numerical output. Refs #26355 should eventually provide a better interface for that. | ||||
* | Removed unused __str__() methods in tests models. | Mariusz Felisiak | 2020-04-30 | 1 | -15/+0 |
| | | | Follow up to 6461583b6cc257d25880ef9a9fd7e2125ac53ce1. | ||||
* | Simplified imports from django.db and django.contrib.gis.db. | Nick Pope | 2020-02-04 | 1 | -3/+2 |
| | |||||
* | Refs #14357 -- Made Meta.ordering not affect GROUP BY queries. | Mariusz Felisiak | 2019-09-10 | 1 | -13/+2 |
| | | | | Per deprecation timeline. | ||||
* | Fixed #28107 -- Added ↵ | Vojtech Bocek | 2019-09-09 | 1 | -0/+27 |
| | | | | DatabaseFeatures.allows_group_by_selected_pks_on_model() to allow enabling optimization for unmanaged models. | ||||
* | Fixed typos in test names and a comment. | Min ho Kim | 2019-08-23 | 1 | -1/+1 |
| | |||||
* | Corrected several typos in string literals and test names. | Min ho Kim | 2019-08-07 | 1 | -1/+1 |
| | |||||
* | Refs #28643 -- Changed Variance() to use NumericOutputFieldMixin. | Nick Pope | 2019-01-14 | 1 | -2/+2 |
| | | | | Keeps precision instead of forcing DecimalField to FloatField. | ||||
* | Refs #28643 -- Changed StdDev() to use NumericOutputFieldMixin. | Nick Pope | 2019-01-14 | 1 | -2/+2 |
| | | | | Keeps precision instead of forcing DecimalField to FloatField. | ||||
* | Refs #28643 -- Changed Avg() to use NumericOutputFieldMixin. | Nick Pope | 2019-01-14 | 1 | -2/+2 |
| | | | | Keeps precision instead of forcing DecimalField to FloatField. | ||||
* | Fixed #28658 -- Added DISTINCT handling to the Aggregate class. | Simon Charette | 2019-01-09 | 1 | -0/+11 |
| | |||||
* | Fixed #30056 -- Added SQLite support for StdDev and Variance functions. | Nick Pope | 2018-12-24 | 1 | -1/+0 |
| | |||||
* | Refs #14357 -- Deprecated Meta.ordering affecting GROUP BY queries. | Ramiro Morales | 2018-09-13 | 1 | -9/+22 |
| | | | Thanks Ramiro Morales for contributing to the patch. | ||||
* | Fixed #29320 -- Added an exception when an annotation alias matches a ↵ | Flávio Juvenal | 2018-04-12 | 1 | -0/+5 |
| | | | | ForeignKey attname. | ||||
* | Fixed #29067 -- Fixed regression in QuerySet.values_list(..., flat=True) ↵ | Jon Dufresne | 2018-01-26 | 1 | -0/+5 |
| | | | | followed by annotate(). | ||||
* | Used assertRaisesMessage() to test Django's error messages. | Mads Jensen | 2017-07-29 | 1 | -8/+26 |
| | |||||
* | Fixed #28107 -- Disabled grouping of selected primary keys for unmanaged models. | Simon Charette | 2017-05-11 | 1 | -0/+37 |
| | | | | | | | | | The grouping caused an issue with database views as PostgreSQL's query planer isn't smart enough to introspect primary keys through views. Django doesn't support database views but documents that unmanaged models should be used to query them. Thanks powderflask for the detailed report and investigation. | ||||
* | Refs #23919 -- Removed most of remaining six usage | Claude Paroz | 2017-01-18 | 1 | -2/+1 |
| | | | | Thanks Tim Graham for the review. | ||||
* | Refs #23919 -- Removed python_2_unicode_compatible decorator usage | Claude Paroz | 2017-01-18 | 1 | -6/+0 |
| | |||||
* | Refs #23919 -- Removed encoding preambles and future imports | Claude Paroz | 2017-01-18 | 2 | -3/+0 |
| | |||||
* | Fixed #25307 -- Fixed QuerySet.annotate() crash with conditional expressions. | Josh Smeaton | 2017-01-16 | 1 | -1/+47 |
| | | | | Thanks Travis Newport for the tests and Josh Smeaton for contributing to the patch. | ||||
* | Fixed #27632 -- Unified query parameters by their values on Oracle. | Mariusz Felisiak | 2016-12-28 | 1 | -0/+13 |
| | |||||
* | Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. | za | 2016-11-10 | 1 | -19/+11 |
| | |||||
* | Fixed typo in tests/aggregation_regress/tests.py. | Tim Graham | 2016-09-24 | 1 | -1/+1 |
| | |||||
* | Fixed #27203 -- Replaced assertQuerysetEqual(..., lambda o: o) with ↵ | Mads Jensen | 2016-09-13 | 1 | -30/+15 |
| | | | | assertSequenceEqual(). | ||||
* | Fixed E128 flake8 warnings in tests/. | Tim Graham | 2016-04-08 | 1 | -8/+16 |
| | |||||
* | Fixed W503 flake8 warnings. | Tim Graham | 2016-04-04 | 1 | -2/+2 |
| | |||||
* | Sorted single letter imports per the latest version of isort. | Tim Graham | 2016-03-28 | 1 | -1/+1 |
| | |||||
* | Fixed #26176 -- Fixed E123 flake8 warnings.26176 | Tim Graham | 2016-02-05 | 1 | -1/+1 |
| | |||||
* | Refs #26022 -- Used context manager version of assertRaises in tests. | Hasan | 2016-01-29 | 1 | -24/+16 |
| | |||||
* | Fixed many spelling mistakes in code, comments, and docs. | Josh Soref | 2015-12-03 | 1 | -2/+2 |
| | |||||
* | Fixed #23395 -- Limited line lengths to 119 characters. | Dražen Odobašić | 2015-09-12 | 1 | -30/+152 |
| | |||||
* | Fixed #25382 -- Removed obsolete references to DateQuerySet. | Renato Oliveira | 2015-09-11 | 1 | -1/+1 |
| |