Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/tests/aggregation_regress
Commit message (Collapse)AuthorAgeFilesLines
* Fixed #23395 -- Limited line lengths to 119 characters.Dražen Odobašić2015-09-121-30/+152
|
* Fixed #25382 -- Removed obsolete references to DateQuerySet.Renato Oliveira2015-09-111-1/+1
|
* Refs #14476 -- Added a test for default annotation name ↵Tim Graham2015-08-061-0/+5
| | | | | | access in aggregate. Fixed in f59fd15c4928caf3dfcbd50f6ab47be409a43b01
* Fixed #21127 -- Started deprecation toward requiring ↵Flavio Curella2015-07-281-7/+7
| | | | on_delete for ForeignKey/OneToOneField
* Fixed #18247 -- Added cast to NUMERIC for Decimals on sqliteMichael Tänzer2015-07-011-0/+14
| | | | | | 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.
* Fixed #24748 -- Fixed incorrect GROUP BY on MySQL in ↵Anssi Kääriäinen2015-05-112-1/+18
| | | | | | | | | some queries 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).
* Fixed #19259 -- Added group by selected primary keys ↵Simon Charette2015-03-301-5/+7
| | | | support.
* Fixed #24171 -- Fixed failure with complex aggregate ↵Anssi Kääriäinen2015-03-091-1/+11
| | | | | | | | | | | query and expressions 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.
* Converted test fixtures to setUpTestData methodsJosh Smeaton2015-03-052-332/+151
|
* Sorted imports with isort; refs #23860.Tim Graham2015-02-062-5/+7
|
* Fixed #24211 -- Removed ValuesQuerySet() and ↵Loic Bistuer2015-01-301-1/+1
| | | | | | ValuesListQuerySet(). Thanks Anssi Kääriäinen, Marc Tamlyn, and Tim Graham for the reviews.
* Fixed #24020 -- Refactored SQL compiler to use expressionsAnssi Kääriäinen2015-01-081-25/+17
| | | | | | | | | | | | | | | 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.
* Fixed #23877 -- aggregation's subquery missed target colAnssi Kääriäinen2014-11-271-0/+27
| | | | | | 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.
* Fixed #23620 -- Used more specific assertions in the ↵Berker Peksag2014-11-031-8/+8
| | | | Django test suite.
* Fixed #23659 -- Kept annotate() args orderingClaude Paroz2014-10-161-0/+11
| | | | Thanks Loic Bistuer and Simon Charette for the review.
* Fixed #18757, #14462, #21565 -- Reworked database-python ↵Marc Tamlyn2014-09-031-12/+0
| | | | | | | | | | | | | | type conversions 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.
* Harmonized some PEP 0263 coding preamblesClaude Paroz2014-05-151-1/+1
|
* Fixed many typos in comments and docstrings.Rodolfo Carvalho2014-03-031-2/+2
| | | | Thanks Piotr Kasprzyk for help with the patch.
* Fixed #19774 -- Deprecated the contenttypes.generic module.Simon Charette2014-01-261-3/+5
| | | | | | | It contained models, forms and admin objects causing undesirable import side effects. Refs #16368. Thanks to Ramiro, Carl and Loïc for the review.
* Fixed all E226 violationsAlex Gaynor2013-11-031-4/+4
|
* PEP8 cleanupJason Myers2013-11-031-1/+5
| | | | Signed-off-by: Jason Myers <jason@jasonamyers.com>
* Fixed all E261 warningscoagulant2013-11-031-1/+1
|
* Fixed all the E203 violationsAlex Gaynor2013-10-271-8/+8
|
* Fix all violators of E231Alex Gaynor2013-10-261-7/+7
|
* Fixed E227 pep8 warningsTim Graham2013-10-211-3/+3
|
* Fixed #21287 -- Fixed E123 pep8 warningsAlasdair Nicol2013-10-181-1/+1
|
* Fixed assorted flake8 errors.Tim Graham2013-10-111-9/+9
|
* Improved Query join promotion logicAnssi Kääriäinen2013-10-052-4/+21
| | | | | | | There were multiple cases where join promotion was a bit too aggressive. This resulted in using outer joins where not necessary. Refs #21150.
* Fixed #21150 -- select_related + annotate join promotion ↵Anssi Kääriäinen2013-10-052-2/+30
| | | | | | | failure Added tests for a .annotate().select_related() join promotion failure. This happened to work on master but was currently untested.
* Fixed #21126 -- QuerySet value conversion failureAnssi Kääriäinen2013-09-251-0/+11
| | | | | | | A .annotate().select_related() query resulted in misaligned rows vs columns for compiler.resolve_columns() method. Report & patch by Michael Manfre.
* Fixed #18333 - Quoted annotated column namesMichael Manfre2013-09-241-0/+10
|
* Fixed #19885 -- cleaned up the django.test namespaceKevin Christopher Henry2013-09-091-1/+2
| | | | | | | | * 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.
* Fixed #20895 -- Made check management command warn if a ↵Alasdair Nicol2013-08-161-1/+1
| | | | | | | BooleanField does not have a default value Thanks to Collin Anderson for the suggestion and Tim Graham for reviewing the patch.
* Fixed #15624 -- Made sure aggregations are present in SELECTFlorian Hahn2013-07-311-0/+7
|
* Removed most of absolute_import importsClaude Paroz2013-07-291-1/+1
| | | | | Should be unneeded with Python 2.7 and up. Added some unicode_literals along the way.
* Stopped using django.utils.unittest in the test suite.Aymeric Augustin2013-07-011-1/+0
| | | | Refs #20680.
* Fixed random aggregation_regress test_more_more_more() ↵Anssi Kääriäinen2013-05-281-1/+7
| | | | | | | failure The cause was assuming that an unordered queryset returns the values always in the same order.
* Fixed failing aggregation tests on MySQLAnssi Kääriäinen2013-03-131-3/+3
|
* Refactored qs.add_q() and utils/tree.pyAnssi Kääriäinen2013-03-131-4/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | The sql/query.py add_q method did a lot of where/having tree hacking to get complex queries to work correctly. The logic was refactored so that it should be simpler to understand. The new logic should also produce leaner WHERE conditions. The changes cascade somewhat, as some other parts of Django (like add_filter() and WhereNode) expect boolean trees in certain format or they fail to work. So to fix the add_q() one must fix utils/tree.py, some things in add_filter(), WhereNode and so on. This commit also fixed add_filter to see negate clauses up the path. A query like .exclude(Q(reversefk__in=a_list)) didn't work similarly to .filter(~Q(reversefk__in=a_list)). The reason for this is that only the immediate parent negate clauses were seen by add_filter, and thus a tree like AND: (NOT AND: (AND: condition)) will not be handled correctly, as there is one intermediary AND node in the tree. The example tree is generated by .exclude(~Q(reversefk__in=a_list)). Still, aggregation lost connectors in OR cases, and F() objects and aggregates in same filter clause caused GROUP BY problems on some databases. Fixed #17600, fixed #13198, fixed #17025, fixed #17000, fixed #11293.
* Merged regressiontests and modeltests into the test root.Florian Apolloner2013-02-264-0/+1368