Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Refs #33766 -- Removed sql.Query.build_filtered_relation_q(). | Simon Charette | 2023-04-24 | 1 | -3/+7 |
| | | | | It was a copy of sql.Query._add_q that avoided JOIN updates. | ||||
* | Fixed #33766 -- Resolved FilteredRelation.condition at referencing time. | Simon Charette | 2023-04-24 | 1 | -12/+19 |
| | | | | | | | | | | | The previous implementation resolved condition at Join compilation time which required introducing a specialized expression resolving mode to alter the join reuse logic solely during that phase. FilteredRelation.condition is now resolved when the relation is first referenced which maintains the existing behavior while allowing the removal of the specialized resolving mode and address an issue where conditions couldn't spawn new joins. | ||||
* | Refs #34233 -- Used @functools.cache. | Nick Pope | 2023-01-18 | 1 | -1/+1 |
| | | | | Python 3.9+ supports @functools.cache as an alias for @functools.lru_cache(maxsize=None). | ||||
* | Fixed #28477 -- Stripped unused annotations on aggregation. | Simon Charette | 2022-11-09 | 1 | -3/+4 |
| | | | | | Also avoid an unnecessary pushdown when aggregating over a query that doesn't have aggregate annotations. | ||||
* | Fixed #33996 -- Fixed CheckConstraint validation on NULL values. | David Sanders | 2022-09-13 | 1 | -3/+7 |
| | | | | | | Bug in 667105877e6723c6985399803a364848891513cc. Thanks James Beith for the report. | ||||
* | Fixed #29799 -- Allowed registering lookups per field instances. | Allen Jonathan David | 2022-09-02 | 1 | -13/+61 |
| | | | | | Thanks Simon Charette and Mariusz Felisiak for reviews and mentoring this Google Summer of Code 2022 project. | ||||
* | Fixed #21204 -- Tracked field deferrals by field instead of models. | Simon Charette | 2022-08-30 | 1 | -4/+4 |
| | | | | | This ensures field deferral works properly when a model is involved more than once in the same query with a distinct deferral mask. | ||||
* | Merged nested if statements in select_related_descend(). | Simon Charette | 2022-08-30 | 1 | -8/+10 |
| | |||||
* | Refs #32948 -- Simplified and optimized Q._combine() and __invert__(). | Nick Pope | 2022-07-27 | 1 | -11/+6 |
| | | | | | | | | | | | | - Removed use of Q.deconstruct() in Q._combine(). - Simplified and optimized Q.__invert__() by taking a shallow copy and swapping the negated attribute only. - Simplified construction in Q._combine(). - Simplified conditions in Q._combine() as Q.conditional = True the first isinstance() check is unnecessary. - Removed copy.copy() branch in Q._combine(). Co-authored-by: Keryn Knight <keryn@kerynknight.com> | ||||
* | Refs #30581 -- Added Q.check() hook. | Gagaro | 2022-05-04 | 1 | -0/+29 |
| | |||||
* | Refs #30581 -- Added Q.flatten(). | Gagaro | 2022-05-03 | 1 | -0/+15 |
| | |||||
* | Fixed #33626 -- Cleared cache when unregistering a lookup. | Himanshu-Balasamanta | 2022-04-12 | 1 | -0/+1 |
| | |||||
* | Updated select_related_descend() comment. | Mariusz Felisiak | 2022-03-31 | 1 | -2/+2 |
| | | | Outdated since 0c7633178fa9410f102e4708cef979b873bccb76. | ||||
* | Fixed #29865 -- Added logical XOR support for Q() and querysets. | Ryan Heard | 2022-03-04 | 1 | -0/+4 |
| | |||||
* | Refs #33476 -- Reformatted code with Black. | django-bot | 2022-02-07 | 1 | -32/+50 |
| | |||||
* | Fixed #32632, Fixed #32657 -- Removed flawed support for Subquery ↵ | Simon Charette | 2021-04-28 | 1 | -6/+4 |
| | | | | | | | | | | | | | | | | | | deconstruction. Subquery deconstruction support required implementing complex and expensive equality rules for sql.Query objects for little benefit as the latter cannot themselves be made deconstructible to their reference to model classes. Making Expression @deconstructible and not BaseExpression allows interested parties to conform to the "expression" API even if they are not deconstructible as it's only a requirement for expressions allowed in Model fields and meta options (e.g. constraints, indexes). Thanks Phillip Cutter for the report. This also fixes a performance regression in bbf141bcdc31f1324048af9233583a523ac54c94. | ||||
* | Fixed #32548 -- Fixed crash when combining Q() objects with boolean expressions. | Jonathan Richards | 2021-03-17 | 1 | -8/+4 |
| | |||||
* | Fixed #32455 -- Allowed right combining Q() with boolean expressions. | Hasan Ramezani | 2021-02-18 | 1 | -1/+1 |
| | |||||
* | Fixed #32450 -- Fixed crash when ANDing/ORing an empty Q() with not ↵ | starryrbs | 2021-02-18 | 1 | -3/+4 |
| | | | | | | pickleable Q(). Regression in bb0b6e526340e638522e093765e534df4e4393d2. | ||||
* | Refs #30988 -- Removed InvalidQuery exception per deprecation timeline. | Mariusz Felisiak | 2021-01-14 | 1 | -29/+1 |
| | |||||
* | Fixed #31680 -- Removed unnecessary getattr() call in ↵ | alosultan | 2020-06-10 | 1 | -2/+2 |
| | | | | | | DeferredAttribute.__get__(). refresh_from_db() loads fields values. | ||||
* | Simplified DeferredAttribute.__get__() a bit. | Taoup | 2020-01-29 | 1 | -1/+1 |
| | |||||
* | Fixed #31060 -- Reallowed window expressions to be used in conditions ↵ | Alex Aktsipetrov | 2019-12-06 | 1 | -1/+4 |
| | | | | | | | | outside of queryset filters. Regression in 4edad1ddf6203326e0be4bdb105beecb0fe454c4. Thanks utapyngo for the report. | ||||
* | Fixed #30988 -- Deprecated the InvalidQuery exception. | Simon Charette | 2019-11-18 | 1 | -6/+31 |
| | | | | | It was barely documented without pointers at its defining location and was abused to prevent misuse of the QuerySet field deferring feature. | ||||
* | Replaced QueryWrapper single usage with RawSQL. | Simon Charette | 2019-11-18 | 1 | -14/+0 |
| | |||||
* | Fixed #30651 -- Made __eq__() methods return NotImplemented for not ↵ | ElizabethU | 2019-10-01 | 1 | -1/+2 |
| | | | | | | | | | implemented comparisons. Changed __eq__ to return NotImplemented instead of False if compared to an object of the same type, as is recommended by the Python data model reference. Now these models can be compared to ANY (or other objects with __eq__ overwritten) without returning False automatically. | ||||
* | Refs #30657 -- Made DeferredAttribute.__init__() to take a field instance ↵ | Jon Dufresne | 2019-07-25 | 1 | -12/+12 |
| | | | | instead of a field name. | ||||
* | Fixed typo in django/db/models/query_utils.py comment. | David Beitey | 2019-04-03 | 1 | -1/+1 |
| | |||||
* | Replaced kwargs.pop() with keyword-only arguments. | Jon Dufresne | 2018-10-08 | 1 | -4/+2 |
| | |||||
* | Refs #28909 -- Simplifed code using unpacking generalizations. | Sergey Fedoseev | 2018-09-28 | 1 | -1/+1 |
| | |||||
* | Refs #29125 -- Made Q.deconstruct() omit 'query_utils' in the path and ↵ | Tim Graham | 2018-02-12 | 1 | -1/+4 |
| | | | | _connector='AND' since it's a default value. | ||||
* | Fixed #29125 -- Made Q.deconstruct() deterministic with multiple keyword ↵ | Tim Graham | 2018-02-12 | 1 | -1/+1 |
| | | | | arguments. | ||||
* | Removed DeferredAttribute.__init__()'s unused model argument. | Mariusz Felisiak | 2018-01-02 | 1 | -1/+1 |
| | | | Unused since a8a81aae20a81e012fddc24f3ede556501af64a2. | ||||
* | Refs #27849 -- Removed empty Q() hack in filtered Aggregate.as_sql(). | Simon Charette | 2017-12-08 | 1 | -0/+1 |
| | | | | | This required allowing WhereNode to be provided as When(condition). This was made possible by cf12257db23fa248c89a3da3f718aa01a50ca659. | ||||
* | Fixed #27332 -- Added FilteredRelation API for conditional join (ON clause) ↵ | Nicolas Delaby | 2017-09-22 | 1 | -1/+42 |
| | | | | | support. Thanks Anssi Kääriäinen for contributing to the patch. | ||||
* | Prevented query_utils.refs_expression() from looking for empty string in ↵ | Sergey Fedoseev | 2017-07-28 | 1 | -1/+1 |
| | | | | annotations map. | ||||
* | Fixed #28211 -- Prevented ORing an empty Q() from reducing query join ↵ | Tom | 2017-05-25 | 1 | -0/+9 |
| | | | | efficiency. | ||||
* | Refs #27656 -- Updated django.db docstring verbs according to PEP 257. | Anton Samarchyan | 2017-02-28 | 1 | -11/+8 |
| | |||||
* | Refs #11964 -- Made Q objects deconstructible. | Ian Foote | 2017-02-23 | 1 | -1/+16 |
| | |||||
* | Refs #23919 -- Replaced super(ClassName, self) with super(). | chillaranand | 2017-01-25 | 1 | -1/+1 |
| | |||||
* | Refs #23919 -- Removed misc references to Python 2. | Tim Graham | 2017-01-21 | 1 | -4/+1 |
| | |||||
* | Refs #23919 -- Stopped inheriting from object to define new style classes. | Simon Charette | 2017-01-19 | 1 | -3/+3 |
| | |||||
* | Refs #23919 -- Stopped using django.utils.lru_cache(). | Aymeric Augustin | 2017-01-18 | 1 | -2/+2 |
| | |||||
* | Refs #23919 -- Removed encoding preambles and future imports | Claude Paroz | 2017-01-18 | 1 | -2/+0 |
| | |||||
* | Removed obsolete lines in DeferredAttribute.__get__(). | Tim Graham | 2016-09-26 | 1 | -10/+1 |
| | | | Obsolete as of c21e86ab9e3e5ebd6d245d038cb0cb352cd84c3a. | ||||
* | Fixed #26891 -- Fixed lookup registration for ForeignObject. | Ryan P Kilby | 2016-08-11 | 1 | -14/+37 |
| | |||||
* | Fixed #26207 -- Replaced dynamic classes with non-data descriptors for ↵ | Anssi Kääriäinen | 2016-04-29 | 1 | -54/+3 |
| | | | | deferred instance loading. | ||||
* | Removed unused Q.clone(). | Tim Graham | 2016-04-25 | 1 | -10/+0 |
| | | | | Unused since afe0bb7b13bb8dc4370f32225238012c873b0ee3. | ||||
* | Removed unused BaseExpression.refs_aggregate(). | Tim Graham | 2016-04-22 | 1 | -33/+0 |
| | | | | Unused since afe0bb7b13bb8dc4370f32225238012c873b0ee3. | ||||
* | Fixed #26486 -- Fixed a select_related() + defer() MTI edge case. | Tim Graham | 2016-04-13 | 1 | -1/+0 |
| |