summaryrefslogtreecommitdiff
path: root/tests/aggregation_regress
AgeCommit message (Collapse)Author
2019-01-14Refs #28643 -- Changed Variance() to use NumericOutputFieldMixin.Nick Pope
Keeps precision instead of forcing DecimalField to FloatField.
2019-01-14Refs #28643 -- Changed StdDev() to use NumericOutputFieldMixin.Nick Pope
Keeps precision instead of forcing DecimalField to FloatField.
2019-01-14Refs #28643 -- Changed Avg() to use NumericOutputFieldMixin.Nick Pope
Keeps precision instead of forcing DecimalField to FloatField.
2019-01-09Fixed #28658 -- Added DISTINCT handling to the Aggregate class.Simon Charette
2018-12-24Fixed #30056 -- Added SQLite support for StdDev and Variance functions.Nick Pope
2018-09-13Refs #14357 -- Deprecated Meta.ordering affecting GROUP BY queries.Ramiro Morales
Thanks Ramiro Morales for contributing to the patch.
2018-04-12Fixed #29320 -- Added an exception when an annotation alias matches a ↵Flávio Juvenal
ForeignKey attname.
2018-01-26Fixed #29067 -- Fixed regression in QuerySet.values_list(..., flat=True) ↵Jon Dufresne
followed by annotate().
2017-07-29Used assertRaisesMessage() to test Django's error messages.Mads Jensen
2017-05-11Fixed #28107 -- Disabled grouping of selected primary keys for unmanaged models.Simon Charette
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.
2017-01-18Refs #23919 -- Removed most of remaining six usageClaude Paroz
Thanks Tim Graham for the review.
2017-01-18Refs #23919 -- Removed python_2_unicode_compatible decorator usageClaude Paroz
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2017-01-16Fixed #25307 -- Fixed QuerySet.annotate() crash with conditional expressions.Josh Smeaton
Thanks Travis Newport for the tests and Josh Smeaton for contributing to the patch.
2016-12-28Fixed #27632 -- Unified query parameters by their values on Oracle.Mariusz Felisiak
2016-11-10Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.za
2016-09-24Fixed typo in tests/aggregation_regress/tests.py.Tim Graham
2016-09-13Fixed #27203 -- Replaced assertQuerysetEqual(..., lambda o: o) with ↵Mads Jensen
assertSequenceEqual().
2016-04-08Fixed E128 flake8 warnings in tests/.Tim Graham
2016-04-04Fixed W503 flake8 warnings.Tim Graham
2016-03-28Sorted single letter imports per the latest version of isort.Tim Graham
2016-02-05Fixed #26176 -- Fixed E123 flake8 warnings.Tim Graham
2016-01-29Refs #26022 -- Used context manager version of assertRaises in tests.Hasan
2015-12-03Fixed many spelling mistakes in code, comments, and docs.Josh Soref
2015-09-12Fixed #23395 -- Limited line lengths to 119 characters.Dražen Odobašić
2015-09-11Fixed #25382 -- Removed obsolete references to DateQuerySet.Renato Oliveira
2015-08-06Refs #14476 -- Added a test for default annotation name access in aggregate.Tim Graham
Fixed in f59fd15c4928caf3dfcbd50f6ab47be409a43b01
2015-07-27Fixed #21127 -- Started deprecation toward requiring on_delete for ↵Flavio Curella
ForeignKey/OneToOneField
2015-06-30Fixed #18247 -- Added cast to NUMERIC for Decimals on sqliteMichael Tänzer
On sqlite the SUM() of a decimal column doesn't have a NUMERIC type so when comparing it to a string literal (which a Decimal gets converted to in Django) it is not compared as expected.
2015-05-11Fixed #24748 -- Fixed incorrect GROUP BY on MySQL in some queriesAnssi Kääriäinen
When the query's model had a self-referential foreign key, the compiler.get_group_by() code incorrectly used the self-referential foreign key's column (for example parent_id) as GROUP BY clause when it should have used the model's primary key column (id).
2015-03-29Fixed #19259 -- Added group by selected primary keys support.Simon Charette
2015-03-09Fixed #24171 -- Fixed failure with complex aggregate query and expressionsAnssi Kääriäinen
The query used a construct of qs.annotate().values().aggregate() where the first annotate used an F-object reference and the values() and aggregate() calls referenced that F-object. Also made sure the inner query's select clause is as simple as possible, and made sure .values().distinct().aggreate() works correctly.
2015-03-05Converted test fixtures to setUpTestData methodsJosh Smeaton
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-01-30Fixed #24211 -- Removed ValuesQuerySet() and ValuesListQuerySet().Loic Bistuer
Thanks Anssi Kääriäinen, Marc Tamlyn, and Tim Graham for the reviews.
2015-01-08Fixed #24020 -- Refactored SQL compiler to use expressionsAnssi Kääriäinen
Refactored compiler SELECT, GROUP BY and ORDER BY generation. While there, also refactored select_related() implementation (get_cached_row() and get_klass_info() are now gone!). Made get_db_converters() method work on expressions instead of internal_type. This allows the backend converters to target specific expressions if need be. Added query.context, this can be used to set per-query state. Also changed the signature of database converters. They now accept context as an argument.
2014-11-27Fixed #23877 -- aggregation's subquery missed target colAnssi Kääriäinen
Aggregation over subquery produced syntactically incorrect queries in some cases as Django didn't ensure that source expressions of the aggregation were present in the subquery.
2014-11-03Fixed #23620 -- Used more specific assertions in the Django test suite.Berker Peksag
2014-10-16Fixed #23659 -- Kept annotate() args orderingClaude Paroz
Thanks Loic Bistuer and Simon Charette for the review.
2014-09-03Fixed #18757, #14462, #21565 -- Reworked database-python type conversionsMarc Tamlyn
Complete rework of translating data values from database Deprecation of SubfieldBase, removal of resolve_columns and convert_values in favour of a more general converter based approach and public API Field.from_db_value(). Now works seamlessly with aggregation, .values() and raw queries. Thanks to akaariai in particular for extensive advice and inspiration, also to shaib, manfre and timograham for their reviews.
2014-05-15Harmonized some PEP 0263 coding preamblesClaude Paroz
2014-03-03Fixed many typos in comments and docstrings.Rodolfo Carvalho
Thanks Piotr Kasprzyk for help with the patch.
2014-01-26Fixed #19774 -- Deprecated the contenttypes.generic module.Simon Charette
It contained models, forms and admin objects causing undesirable import side effects. Refs #16368. Thanks to Ramiro, Carl and Loïc for the review.
2013-11-03Fixed all E226 violationsAlex Gaynor
2013-11-02PEP8 cleanupJason Myers
Signed-off-by: Jason Myers <jason@jasonamyers.com>
2013-11-02Fixed all E261 warningscoagulant
2013-10-26Fixed all the E203 violationsAlex Gaynor
2013-10-26Fix all violators of E231Alex Gaynor
2013-10-21Fixed E227 pep8 warningsTim Graham
2013-10-18Fixed #21287 -- Fixed E123 pep8 warningsAlasdair Nicol