summaryrefslogtreecommitdiff
path: root/tests/aggregation
AgeCommit message (Collapse)Author
2019-01-21[2.2.x] Fixed #30120 -- Fixed invalid SQL in distinct aggregate.Simon Charette
Regression in bc05547cd8c1dd511c6b6a6c873a1bc63417b111 (refs #28658). Backport of 65858119d23e37872505a4476e7141c33981fb50 from master.
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-06Fixed #30011 -- Fixed queries that reuse filtered aggregates.Simon Charette
Thanks Taqi Abbas and Raphael Kimmig for the report.
2018-08-23Fixed #29048 -- Added **extra_context to database function as_vendor() methods.priyanshsaxena
2018-02-02Simplified aggregation.tests. Mariusz Felisiak
2017-08-12Fixed #27849 -- Added filtering support to aggregates.Tom
2017-07-21Refs #24887 -- Stopped mutating a test expression during as_sql().Simon Charette
Also defined an explicit output_field as it was mixing an expression with an IntegerField() with one with a DecimalField().
2017-07-11Fixed #28382 -- Prevented BaseExpression._output_field from being set if ↵Sergey Fedoseev
_resolve_output_field() fails.
2017-06-29Fixed #28277 -- Added validation of QuerySet.annotate() and aggregate() args.Mariusz Felisiak
Thanks Tim Graham and Nick Pope for reviews.
2017-06-01Refs #23968 -- Removed unnecessary lists, generators, and tuple calls.Jon Dufresne
2017-01-25Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand
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-14Fixed tests that rely on hardcoded id with keepdbJosh Smeaton
2016-11-10Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.za
2016-04-05Fixed #26458 -- Based Avg's default output_field resolution on its source ↵Simon Charette
field type. Thanks Tim for the review and Josh for the input.
2016-03-28Sorted single letter imports per the latest version of isort.Tim Graham
2016-01-29Refs #26022 -- Replaced six.assertRaisesRegex with assertRaisesMessage as ↵Hasan
appropriate.
2015-12-03Fixed many spelling mistakes in code, comments, and docs.Josh Soref
2015-09-23Refs #14030 -- Removed backwards compatiblity for old-style aggregates.Tim Graham
Per deprecation timeline.
2015-09-14Fixed #25377 -- Changed Count queries to execute COUNT(*) instead of COUNT('*').Adam Chainz
2015-09-12Fixed #23395 -- Limited line lengths to 119 characters.Dražen Odobašić
2015-07-27Fixed #21127 -- Started deprecation toward requiring on_delete for ↵Flavio Curella
ForeignKey/OneToOneField
2015-07-27Fixed #25095 -- Fixed annotate() + values() group by bugMitchell Kotler
Thanks Josh Smeaton for help on the tests.
2015-07-13Fixed #24923 -- errored out nicely when using aggregates in order_by()Anssi Kääriäinen
2015-06-27Fixed #24887 -- Removed one-arg limit from models.aggregateGreg Chapple
2015-06-24Renamed RemovedInDjangoXYWarnings for new roadmap.Tim Graham
Forwardport of ae1d663b7913f6da233c55409c4973248372d302 from stable/1.8.x plus more.
2015-05-30Fixed #24699 -- Added aggregate support for DurationField on OracleJosh Smeaton
2015-04-25Fixed #24649 -- Allowed using Avg aggregate on non-numeric field types.Tim Graham
2015-04-14Refs #24385 -- Added tests for distinct sum issue fixed in ↵Edward Henderson
c7fd9b242d2d63406f1de6cc3204e35aaa025233
2015-03-05Converted test fixtures to setUpTestData methodsJosh Smeaton
2015-02-13Refs #14030 -- Added tests for Value aggregatesJosh Smeaton
2015-02-12Refs #14030 -- Improved expression support for python valuesJosh Smeaton
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-01-22Fixed small inconsistency when handling aggregate's default_alias.Loic Bistuer
Refs #14030.
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-12-30Applied ignore_warnings to Django testsClaude Paroz
2014-12-12Fixed #23941 -- Removed implicit decimal formatting from expressions.Josh Smeaton
2014-11-16Renamed qn to compilerJosh Smeaton
2014-11-16Removed references to the deprecated assertRaisesRegexp method.Simon Charette
2014-11-15Fixed #14030 -- Allowed annotations to accept all expressionsJosh Smeaton
2014-08-12Fixed #23001 -- Fixed mixing defer and annotationsJosh Smeaton
2014-05-15Harmonized some PEP 0263 coding preamblesClaude Paroz
2014-01-18Fixed #16187 -- refactored ORM lookup systemAnssi Kääriäinen
Allowed users to specify which lookups or transforms ("nested lookus") are available for fields. The implementation is now class based. Squashed commit of the following: commit fa7a7195f1952a9c8dea7f6e89ee13f81757eda7 Author: Anssi Kääriäinen <akaariai@gmail.com> Date: Sat Jan 18 10:53:24 2014 +0200 Added lookup registration API docs commit eb1c8ce164325e0d8641f14202e12486c70efdb6 Author: Anssi Kääriäinen <akaariai@gmail.com> Date: Tue Jan 14 18:59:36 2014 +0200 Release notes and other minor docs changes commit 11501c29c9352d17f22f3a0f59d3b805913dedcc Author: Anssi Kääriäinen <akaariai@gmail.com> Date: Sun Jan 12 20:53:03 2014 +0200 Forgot to add custom_lookups tests in prev commit commit 83173b960ea7eb2b24d573f326be59948df33536 Author: Anssi Kääriäinen <akaariai@gmail.com> Date: Sun Jan 12 19:59:12 2014 +0200 Renamed Extract -> Transform commit 3b18d9f3a1bcdd93280f79654eba0efa209377bd Author: Anssi Kääriäinen <akaariai@gmail.com> Date: Sun Jan 12 19:51:53 2014 +0200 Removed suggestion of temporary lookup registration from docs commit 21d0c7631c161fc0c67911480be5d3f13f1afa68 Merge: 2509006 f2dc442 Author: Anssi Kääriäinen <akaariai@gmail.com> Date: Sun Jan 12 09:38:23 2014 -0800 Merge pull request #2 from mjtamlyn/lookups_3 Reworked custom lookups docs. commit f2dc4429a1da04c858364972eea57a35a868dab4 Author: Marc Tamlyn <marc.tamlyn@gmail.com> Date: Sun Jan 12 13:15:05 2014 +0000 Reworked custom lookups docs. Mostly just formatting and rewording, but also replaced the example using ``YearExtract`` to use an example which is unlikely to ever be possible directly in the ORM. commit 250900650628d1f11beadb22814abd666029fb81 Author: Anssi Kääriäinen <akaariai@gmail.com> Date: Sun Jan 12 13:19:13 2014 +0200 Removed unused import commit 4fba5dfaa022653ffa72497258ffd8f8b7476f92 Author: Anssi Kääriäinen <akaariai@gmail.com> Date: Sat Jan 11 22:34:41 2014 +0200 Added docs to index commit 6d53963f375c77a1f287833b19b976d23f36c30b Author: Anssi Kääriäinen <akaariai@gmail.com> Date: Sat Jan 11 22:10:24 2014 +0200 Dead code removal commit f9cc0390078e21f1ea5a7bc1f15b09f8f6b0904d Author: Anssi Kääriäinen <akaariai@gmail.com> Date: Sat Jan 11 19:00:43 2014 +0200 A new try for docs commit 33aa18a6e3c831930bda0028222a26f9c1d96e66 Author: Anssi Kääriäinen <akaariai@gmail.com> Date: Sat Jan 11 14:57:12 2014 +0200 Renamed get_cols to get_group_by_cols commit c7d5f8661b7d364962bed2e6f81161c1b4f1bcc3 Author: Anssi Kääriäinen <akaariai@gmail.com> Date: Sat Jan 11 14:45:53 2014 +0200 Altered query string customization for backends vendors The new way is trying to call first method 'as_' + connection.vendor. If that doesn't exist, then call as_sql(). Also altered how lookup registration is done. There is now RegisterLookupMixin class that is used by Field, Extract and sql.Aggregate. This allows one to register lookups for extracts and aggregates in the same way lookup registration is done for fields. commit 90e7004ec14e15503f828cc9bde2a7dab593814d Merge: 66649ff f7c2c0a Author: Anssi Kääriäinen <akaariai@gmail.com> Date: Sat Jan 11 13:21:01 2014 +0200 Merge branch 'master' into lookups_3 commit 66649ff891c7c73c7eecf6038c9a6802611b5d8a Author: Anssi Kääriäinen <akaariai@gmail.com> Date: Sat Jan 11 13:16:01 2014 +0200 Some rewording in docs commit 31b8faa62714b4b6b6057a9f5cc106c4dd73caab Author: Anssi Kääriäinen <akaariai@gmail.com> Date: Sun Dec 29 15:52:29 2013 +0200 Cleanup based on review comments commit 1016159f34674c0df871ed891cde72be8340bb5d Author: Anssi Kääriäinen <akaariai@gmail.com> Date: Sat Dec 28 18:37:04 2013 +0200 Proof-of-concept fix for #16731 Implemented only for SQLite and PostgreSQL, and only for startswith and istartswith lookups. commit 193cd097ca8f2cc6a911e57b8e3fb726f96ee6a6 Author: Anssi Kääriäinen <akaariai@gmail.com> Date: Sat Dec 28 17:57:58 2013 +0200 Fixed #11722 -- iexact=F() produced invalid SQL commit 08ed3c3b49e100ed9019831e770c25c8f61b70f9 Author: Anssi Kääriäinen <akaariai@gmail.com> Date: Sat Dec 21 23:59:52 2013 +0200 Made Lookup and Extract available from django.db.models commit b99c8d83c972786c6fcd0e84c9e5cb08c1368300 Author: Anssi Kääriäinen <akaariai@gmail.com> Date: Sat Dec 21 23:06:29 2013 +0200 Fixed review notes by Loic commit 049eebc0703c151127f4f0265beceea7b8b39e72 Merge: ed8fab7 b80a835 Author: Anssi Kääriäinen <akaariai@gmail.com> Date: Sat Dec 21 22:53:10 2013 +0200 Merge branch 'master' into lookups_3 Conflicts: django/db/models/fields/__init__.py django/db/models/sql/compiler.py django/db/models/sql/query.py tests/null_queries/tests.py commit ed8fab7fe8867ff3eb801c3697a426478387bb2f Author: Anssi Kääriäinen <akaariai@gmail.com> Date: Sat Dec 21 22:47:23 2013 +0200 Made Extracts aware of full lookup path commit 27a57b7aed91b2f346abc4a77da838bffa17c727 Author: Anssi Kääriäinen <akaariai@gmail.com> Date: Sun Dec 1 21:10:11 2013 +0200 Removed debugger import commit 074e0f5aca0572e368c11e6d2c73c9026e7d63d7 Author: Anssi Kääriäinen <akaariai@gmail.com> Date: Sun Dec 1 21:02:16 2013 +0200 GIS lookup support added commit 760e28e72bae475b442b026650969b0d182dbe53 Author: Anssi Kääriäinen <akaariai@gmail.com> Date: Sun Dec 1 20:04:31 2013 +0200 Removed usage of Constraint, used Lookup instead commit eac47766844b90e7d3269e7a8c012eee34ec0093 Author: Anssi Kääriäinen <akaariai@gmail.com> Date: Sun Dec 1 02:22:30 2013 +0200 Minor cleanup of Lookup API commit 2adf50428d59a783078b0da3d5d035106640c899 Author: Anssi Kääriäinen <akaariai@gmail.com> Date: Sun Dec 1 02:14:19 2013 +0200 Added documentation, polished implementation commit 32c04357a87e3727a34f8c5e6ec0114d1fbbb303 Author: Anssi Kääriäinen <akaariai@gmail.com> Date: Sat Nov 30 23:10:15 2013 +0200 Avoid OrderedDict creation on lookup aggregate check commit 7c8b3a32cc17b4dbca160921d48125f1631e0df4 Author: Anssi Kääriäinen <akaariai@gmail.com> Date: Sat Nov 30 23:04:34 2013 +0200 Implemented nested lookups But there is no support of using lookups outside filtering yet. commit 4d219d4cdef21d9c14e5d6b9299d583d1975fcba Author: Anssi Kääriäinen <akaariai@gmail.com> Date: Wed Nov 27 22:07:30 2013 +0200 Initial implementation of custom lookups
2013-11-02PEP8 cleanupJason Myers
Signed-off-by: Jason Myers <jason@jasonamyers.com>
2013-10-24Start attacking E231 violationsAlex Gaynor
2013-10-10Whitespace cleanup.Tim Graham
* Removed trailing whitespace. * Added newline to EOF if missing. * Removed blank lines at EOF. * Removed some stray tabs.
2013-09-09Fixed #19885 -- cleaned up the django.test namespaceKevin Christopher Henry
* override_settings may now be imported from django.test * removed Approximate from django.test * updated documentation for things importable from django.test Thanks akaariai for the suggestion.
2013-08-19Fixed an aggregation test failure on MySQL.Simon Charette