summaryrefslogtreecommitdiff
path: root/django/db/models/expressions.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Fixed #30027 -- Errored out on Window function usage if unsupported.Simon Charette2019-02-091-0/+3
|
* Simplified Window.as_sql().Sergey Fedoseev2019-02-091-2/+2
|
* Fixed #30099 -- Fixed invalid SQL when filtering a Subquery by an aggregate.Nasir Hussain2019-01-151-0/+1
|
* Removed unnecessary string formatting of strings.Jon Dufresne2019-01-141-1/+1
|
* Fixed #29851 -- Fixed crash of annotations with window expressions in Subquery.Mariusz Felisiak2018-12-271-9/+9
|
* Moved make_hashable() to django.utils and added tests.aspalding2018-10-171-10/+1
|
* Fixed #29745 -- Based Expression equality on detailed initialization signature.Simon Charette2018-10-021-22/+29
| | | | | | | The old implementation considered objects initialized with an equivalent signature different if some arguments were provided positionally instead of as keyword arguments. Refs #11964, #26167.
* Refs #28909 -- Simplifed code using unpacking generalizations.Sergey Fedoseev2018-09-281-2/+1
|
* Removed unused function argument from Window.as_sql().Mariusz Felisiak2018-08-201-1/+1
| | | Unused since its introduction in d549b8805053d4b064bf492ba90e90db5d7e2a6b.
* Fixed #11964 -- Added support for database check constraints.Ian Foote2018-07-101-3/+39
|
* Fixed #29330 -- Fixed crash when pickling BaseExpression.Daniel Miller2018-04-161-0/+5
| | | | Regression in cfff2af02be40106d4759cc6f8bfa476ce82421c.
* Fixed #29195 -- Fixed Exists.output_field resolution on single-valued queries.Simon Charette2018-03-081-2/+5
| | | | | | | | | | | | | The Subquery class which Exists inherits from defaulted to using single-valued querie's field if no output_field was explicitly specified on initialization which was bypassing the Exists.output_field defined at the class level. Moving Subquery's dynamic output_field resolution to _resolve_output_field should make sure the fallback logic is only performed if required. Regression in 08654a99bbdd09049d682ae57cc94241534b29f0. Thanks Oli Warner for the detailed report.
* Fixed #29172 -- Fixed crash with Window expression in a subquery.Tomáš Ehrlich2018-03-011-2/+4
|
* Fixed #29166 -- Fixed crash in When() expression with a list argument.Mariusz Felisiak2018-02-281-1/+6
| | | | | Thanks Matthew Pava for the report and Tim Graham and Carlton Gibson for reviews. Regression in 19b2dfd1bfe7fd716dd3d8bfa5f972070d83b42f.
* Fixed #29142 -- Fixed crash when OuterRef is used with an operator.Matthew Schinckel2018-02-231-0/+3
|
* Fixed #29118 -- Fixed crash with QuerySet.order_by(Exists(...)).Raphael Gaschignard2018-02-101-2/+2
|
* Fixed #29066 -- Allowed negating query expressions.priyanshsaxena2018-01-311-0/+3
|
* Fixed #28930 -- Simplified code with any() and all().Дилян Палаузов2017-12-261-12/+3
|
* Fixed #28731 -- Added an error message when using an empty Q() in a When ↵Tim Martin2017-12-261-0/+2
| | | | | | expression. Otherwise it generates invalid SQL.
* Fixed #28909 -- Simplified code using tuple/list/set/dict unpacking.Nick Pope2017-12-111-8/+5
|
* Refs #27849 -- Removed empty Q() hack in filtered Aggregate.as_sql().Simon Charette2017-12-081-1/+1
| | | | | This required allowing WhereNode to be provided as When(condition). This was made possible by cf12257db23fa248c89a3da3f718aa01a50ca659.
* Fixed #28860 -- Removed unnecessary len() calls.Дилян Палаузов2017-12-041-2/+2
|
* Fixed #28848 -- Fixed SQLite/MySQL crash when ordering by a filtered ↵Raphael Michel2017-11-271-0/+1
| | | | subquery that uses nulls_first/nulls_last.
* Fixed #28689 -- Fixed unquoted table names in Subquery SQL when using OuterRef.Mariusz Felisiak2017-10-251-1/+1
| | | Regression in f48bc7c3dbd204eefb3c19016b1e4906ac26bee3.
* Fixed #28722 -- Made QuerySet.reverse() affect nulls_first/nulls_last.Tomer Chachamu2017-10-211-0/+3
|
* Merged hash() calls.Mariusz Felisiak2017-09-281-8/+2
| | | Thanks Simon Charette for the review.
* Fixed #27857 -- Dropped support for Python 3.4.Tim Graham2017-09-251-6/+0
|
* Fixed #26608 -- Added support for window expressions (OVER clause).Mads Jensen2017-09-181-0/+198
| | | | | Thanks Josh Smeaton, Mariusz Felisiak, Sergey Fedoseev, Simon Charettes, Adam Chainz/Johnson and Tim Graham for comments and reviews and Jamie Cockburn for initial patch.
* Fixed #28492 -- Defined default output_field of expressions at the class level.Simon Charette2017-09-111-7/+5
| | | | | | This wasn't possible when settings were accessed during Field initialization time as our test suite setup script was triggering imports of expressions before settings were configured.
* Reverted "Fixed #27818 -- Replaced try/except/pass with contextlib.suppress()."Tim Graham2017-09-071-2/+3
| | | | This reverts commit 550cb3a365dee4edfdd1563224d5304de2a57fda because try/except performs better.
* Refs #28459 -- Improved performance of BaseExpression.convert_value().Sergey Fedoseev2017-08-111-9/+22
|
* Replaced typecast_decimal() with decimal.Decimal().Sergey Fedoseev2017-08-111-2/+2
|
* Refs #18247 -- Fixed filtering on ↵Sergey Fedoseev2017-08-101-9/+15
| | | | CombinedExpression(output_field=DecimalField()) annotation on SQLite.
* Removed unused _combine() node argument from various combinable classes.Mariusz Felisiak2017-08-021-1/+1
| | | | | Unused since f59fd15c4928caf3dfcbd50f6ab47be409a43b01 (Combinable) and since its introduction in 2d877da85526bad0dad7fd6b1d56b1f924c0116a (SearchVectorCombinable/SearchQueryCombinable/SearchQuery).
* Stopped setting BaseExpression.copied on copy().Simon Charette2017-07-211-3/+1
| | | | Unused since its introduction in f59fd15c4928caf3dfcbd50f6ab47be409a43b01.
* Sorted display of options in Func.__repr__().orf2017-07-201-1/+1
|
* Fixed #28370 -- Deprecated the context arg of Field.from_db_value() and ↵Tim Graham2017-07-201-1/+1
| | | | | | Expression.convert_value(). Unused since a0d166306fbdc41f49e6fadf4ec84b17eb147daa.
* Allowed Func subclasses to add kwargs to __repr__().Mariusz Felisiak2017-07-171-1/+6
| | | Thanks Tim Graham for the review.
* Fixed #28394 -- Allowed setting BaseExpression.output_field (renamed from ↵Sergey Fedoseev2017-07-141-23/+25
| | | | _output_field).
* Fixed #28382 -- Prevented BaseExpression._output_field from being set if ↵Sergey Fedoseev2017-07-111-13/+6
| | | | _resolve_output_field() fails.
* Fixed #28365 -- Unified DatabaseOperations.date_interval_sql() return value ↵Mariusz Felisiak2017-07-061-1/+1
| | | | with similar methods.
* Removed obsolete Query.tables attribute.Anssi Kääriäinen2017-06-291-1/+1
| | | | Obsolete since Query.alias_map became an OrderedDict (refs #26522).
* Fixed #27818 -- Replaced try/except/pass with contextlib.suppress().Mads Jensen2017-06-281-3/+2
|
* Fixed #28199 -- Fixed Subquery generating unnecessary/invalid CAST.Tim Graham2017-05-301-1/+0
| | | Thanks Simon Charette for the fix.
* Refs #18247 -- Fixed SQLite QuerySet filtering on decimal result of Least ↵Sergey Fedoseev2017-03-291-2/+2
| | | | and Greatest.
* Fixed #27862 -- Fixed incorrectly quoted table aliases in Subquery SQL.Matthew Schinckel2017-03-011-1/+6
| | | | | | | Add aliases from resolved querysets to the parent query's external aliases to prevent those aliases from being quoted. Thanks to Vasily Stepanov for the report and Tim Graham for the review.
* Refs #27656 -- Updated django.db docstring verbs according to PEP 257.Anton Samarchyan2017-02-281-34/+16
|
* Refs #11964, #26167 -- Made Expressions deconstructible.Ian Foote2017-02-231-0/+36
|
* Refs #23919 -- Used yield from.Vytis Banaitis2017-02-231-2/+1
|
* Fixed #27828 -- Fixed a crash when subtracting Integer/DurationField from ↵Vytis Banaitis2017-02-161-1/+1
| | | | DateField on Oracle/PostgreSQL.