Tomer Chachamu
21a3a29dc9
Fixed #28722 -- Made QuerySet.reverse() affect nulls_first/nulls_last.
2017-10-21 20:55:45 -04:00
Mariusz Felisiak
2b5a511bd9
Merged hash() calls.
...
Thanks Simon Charette for the review.
2017-09-28 12:12:47 -04:00
Tim Graham
cfff2af02b
Fixed #27857 -- Dropped support for Python 3.4.
2017-09-25 17:11:03 -04:00
Mads Jensen
d549b88050
Fixed #26608 -- Added support for window expressions (OVER clause).
...
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.
2017-09-18 09:42:29 -04:00
Simon Charette
08654a99bb
Fixed #28492 -- Defined default output_field of expressions at the class level.
...
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.
2017-09-11 12:22:39 -04:00
Tim Graham
6e4c6281db
Reverted "Fixed #27818 -- Replaced try/except/pass with contextlib.suppress()."
...
This reverts commit 550cb3a365
because try/except performs better.
2017-09-07 08:16:21 -04:00
Sergey Fedoseev
47ccefeada
Refs #28459 -- Improved performance of BaseExpression.convert_value().
2017-08-11 18:34:50 -04:00
Sergey Fedoseev
f3e350d631
Replaced typecast_decimal() with decimal.Decimal().
2017-08-11 09:22:40 -04:00
Sergey Fedoseev
c3c6c92d76
Refs #18247 -- Fixed filtering on CombinedExpression(output_field=DecimalField()) annotation on SQLite.
2017-08-10 17:42:30 -04:00
Mariusz Felisiak
7724879b52
Removed unused _combine() node argument from various combinable classes.
...
Unused since f59fd15c49
(Combinable) and
since its introduction in 2d877da855
(SearchVectorCombinable/SearchQueryCombinable/SearchQuery).
2017-08-02 21:21:32 -04:00
Simon Charette
76236f0db2
Stopped setting BaseExpression.copied on copy().
...
Unused since its introduction in f59fd15c49
.
2017-07-21 00:23:21 -04:00
orf
7dfe03f86d
Sorted display of options in Func.__repr__().
2017-07-20 20:51:07 -04:00
Tim Graham
487362fa8f
Fixed #28370 -- Deprecated the context arg of Field.from_db_value() and Expression.convert_value().
...
Unused since a0d166306f
.
2017-07-20 16:30:08 -04:00
Mariusz Felisiak
e5835a7cb8
Allowed Func subclasses to add kwargs to __repr__().
...
Thanks Tim Graham for the review.
2017-07-17 10:07:19 -04:00
Sergey Fedoseev
504ce3914f
Fixed #28394 -- Allowed setting BaseExpression.output_field (renamed from _output_field).
2017-07-14 21:56:01 -04:00
Sergey Fedoseev
29769a9942
Fixed #28382 -- Prevented BaseExpression._output_field from being set if _resolve_output_field() fails.
2017-07-11 08:29:08 -04:00
Mariusz Felisiak
df1106a40f
Fixed #28365 -- Unified DatabaseOperations.date_interval_sql() return value with similar methods.
2017-07-06 07:37:47 -04:00
Anssi Kääriäinen
f7f5edd50d
Removed obsolete Query.tables attribute.
...
Obsolete since Query.alias_map became an OrderedDict (refs #26522 ).
2017-06-29 11:09:11 -04:00
Mads Jensen
550cb3a365
Fixed #27818 -- Replaced try/except/pass with contextlib.suppress().
2017-06-28 14:07:55 -04:00
Tim Graham
f04495521a
Fixed #28199 -- Fixed Subquery generating unnecessary/invalid CAST.
...
Thanks Simon Charette for the fix.
2017-05-30 06:40:41 -04:00
Sergey Fedoseev
068d75688f
Refs #18247 -- Fixed SQLite QuerySet filtering on decimal result of Least and Greatest.
2017-03-29 13:29:53 -04:00
Matthew Schinckel
f48bc7c3db
Fixed #27862 -- Fixed incorrectly quoted table aliases in Subquery SQL.
...
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.
2017-03-01 07:56:37 -05:00
Anton Samarchyan
60e52a047e
Refs #27656 -- Updated django.db docstring verbs according to PEP 257.
2017-02-28 09:17:27 -05:00
Ian Foote
19b2dfd1bf
Refs #11964 , #26167 -- Made Expressions deconstructible.
2017-02-23 20:44:06 -05:00
Vytis Banaitis
3dcc351691
Refs #23919 -- Used yield from.
2017-02-23 20:06:01 -05:00
Vytis Banaitis
d5088f838d
Fixed #27828 -- Fixed a crash when subtracting Integer/DurationField from DateField on Oracle/PostgreSQL.
2017-02-16 11:46:32 -05:00
Vytis Banaitis
8838d4dd49
Refs #23919 -- Replaced kwargs.pop() with keyword-only arguments.
2017-02-01 11:41:56 -05:00
chillaranand
d6eaf7c018
Refs #23919 -- Replaced super(ClassName, self) with super().
2017-01-25 12:23:46 -05:00
Tim Graham
d170c63351
Refs #23919 -- Removed misc references to Python 2.
2017-01-21 20:02:00 -05:00
Simon Charette
cecc079168
Refs #23919 -- Stopped inheriting from object to define new style classes.
2017-01-19 08:39:46 +01:00
Claude Paroz
7b2f2e74ad
Refs #23919 -- Removed six.<various>_types usage
...
Thanks Tim Graham and Simon Charette for the reviews.
2017-01-18 20:18:46 +01:00
Matthew Schinckel
236ebe94bf
Fixed #27149 -- Added Subquery and Exists database expressions.
...
Thanks Josh Smeaton for Oracle fixes.
2017-01-14 09:12:24 -05:00
anabelensc
1c12df4aa6
Fixed #25912 -- Added binary left/right shift operators to F expressions.
...
Thanks Mariusz Felisiak for review and MySQL advice.
2017-01-03 14:15:46 -05:00
Mariusz Felisiak
7d14889aa3
Fixed #27615 -- Used timedeltas as arguments to Oracle database driver.
...
Removed unused DatabaseFeatures.driver_supports_timedeltas workaround.
2016-12-29 15:49:18 -05:00
Yohann Gabory
47ef8f31f3
Fixed #13312 -- Allowed specifying the order of null fields in queries.
...
Thanks Mariusz Felisiak for finishing the patch.
2016-12-08 09:54:07 -05:00
Sergey Fedoseev
f909fa84be
Fixed #25708 -- Fixed annotations with geometry values.
2016-12-07 14:16:29 -05:00
Johannes Dollinger
46509cf13d
Moved EmpytResultSet to django.core.exceptions.
...
This removes the need for some inner imports.
2016-08-08 10:43:34 -04:00
Johannes Dollinger
1410616e0e
Fixed #26433 -- Fixed Case expressions with empty When.
2016-08-08 10:43:33 -04:00
Josh Smeaton
2a4af0ea43
Fixed #25774 -- Refactor datetime expressions into public API
2016-05-18 20:14:58 +10:00
Claude Paroz
388bb5bd9a
Fixed #22936 -- Obsoleted Field.get_prep_lookup()/get_db_prep_lookup()
...
Thanks Tim Graham for completing the initial patch.
2016-05-04 20:02:01 +02:00
Ville Skyttä
575a9a791e
Normalized "an SQL" spelling.
2016-05-03 19:30:48 -04:00
Tim Graham
a755e0657e
Removed unused BaseExpression.refs_aggregate().
...
Unused since afe0bb7b13
.
2016-04-22 13:04:13 -04:00
Marc Tamlyn
2d877da855
Refs #3254 -- Added full text search to contrib.postgres.
...
Adds a reasonably feature complete implementation of full text search
using the built in PostgreSQL engine. It uses public APIs from
Expression and Lookup.
With thanks to Tim Graham, Simon Charettes, Josh Smeaton, Mikey Ariel
and many others for their advice and review. Particular thanks also go
to the supporters of the contrib.postgres kickstarter.
2016-04-22 10:44:37 +01:00
Tim Graham
2cd2d18851
Fixed W503 flake8 warnings.
2016-04-04 17:14:26 -04:00
Kai Feldhoff
5336158990
Fixed #25759 -- Added keyword arguments to customize Expressions' as_sql().
2016-03-29 08:09:58 -04:00
Tim Graham
fb84e877ce
Normalized Func.as_sqlite() signature.
2016-03-28 10:59:12 -04:00
Simon Charette
766afc22a1
Fixed #24793 -- Unified temporal difference support.
2016-02-26 12:25:12 -05:00
Anssi Kääriäinen
46ecfb9b3a
Fixed #26196 -- Made sure __in lookups use to_field as default.
...
Thanks Simon Charette for the test.
2016-02-11 11:09:08 -05:00
varunnaganathan
3eba9638ee
Fixed #25316 -- Fixed a crash with order_by() and values() after annotate().
2016-01-02 07:06:54 -05:00
Josh Soref
93452a70e8
Fixed many spelling mistakes in code, comments, and docs.
2015-12-03 12:48:24 -05:00