Mariusz Felisiak
4f27e475b3
Refs #28643 -- Reorganized database functions.
...
Thanks Tim Graham for the review.
2017-10-13 21:23:00 +02:00
Rachel Tobin
6c92f711ea
Refs #28575 -- Allowed pickling Model.DoesNotExist and MultipleObjectsReturned classes.
2017-10-13 09:16:09 -04:00
Paulo
a7b5ad8b19
Fixed #27846 -- Made Model.refresh_from_db() clear cached relations.
2017-10-12 17:04:10 -04:00
Mariusz Felisiak
0899d583bd
Fixed #28670 -- Added FETCH/OFFSET support on Oracle.
...
Thanks Tim Graham for the review.
2017-10-09 18:07:03 +02:00
Mariusz Felisiak
11ade8eefd
Refs #24254 -- Removed unnecessary SQL AS clause in SQLCompiler.as_sql().
...
Incorrect on Oracle.
2017-10-06 12:47:41 -04:00
Simon Charette
9d93dff333
Fixed #28665 -- Change some database exceptions to NotImplementedError per PEP 249.
2017-10-06 12:47:08 -04:00
Mariusz Felisiak
1b823b8f18
Fixed #28596 -- Fixed QuerySet.bulk_create() and cascade deletion crash on Oracle when using more than 65535 parameters.
...
Thanks Tim Graham for the review.
2017-10-05 18:52:37 +02:00
Mariusz Felisiak
03da070f5c
Refs #28670 -- Moved LIMIT/OFFSET SQL to DatabaseOperations.limit_offset_sql().
...
Thanks Tim Graham for the review.
2017-10-04 20:24:38 +02:00
Tim Graham
d0c761d3f8
Refs #28584 -- Removed unused DatabaseFeatures.can_share_in_memory_db.
2017-10-03 20:17:12 -04:00
Tim Graham
a2626cb3fe
Fixed #28674 -- Removed unused check in QuerySet._batched_insert().
2017-10-03 19:56:44 -04:00
Tim Graham
27193aea00
Fixed #28584 -- Dropped support for SQLite < 3.7.15.
2017-10-03 10:42:18 -04:00
Tim Graham
51d230e00b
Fixed #28675 -- Removed always True variable in SQLInsertCompiler.execute_sql() check.
...
Unused since 7deb25b8dd
.
2017-10-03 10:32:11 -04:00
Дилян Палаузов
5d9b736fd8
Fixed #28652 -- Fixed a few comments in django/db/models/*.
2017-10-02 11:15:26 -04:00
Mariusz Felisiak
d896809a3a
Refs #23919 -- Removed unneeded float()/int() calls.
2017-10-02 08:49:26 -04:00
Mads Jensen
6d1df84c00
Corrected typos in BaseDatabaseOperations exception messages.
2017-09-30 19:18:51 -04:00
Tim Graham
dd82f33271
Fixed #27979 -- Made MySQL raise IntegrityError rather than OperationalError when saving negative numbers in PositiveInteger fields.
2017-09-29 15:20:32 -04:00
Mads Jensen
8d40eb0e89
Used NotSupportedError for some unsupported database opreations per PEP 249.
2017-09-29 09:49:55 -04:00
Simon Charette
f1b713024e
Refs #28492 -- Defined aggregates' output_field at the class level.
...
Missed in 08654a99bb
.
2017-09-29 07:44:27 -04:00
Mariusz Felisiak
2b5a511bd9
Merged hash() calls.
...
Thanks Simon Charette for the review.
2017-09-28 12:12:47 -04:00
Mads Jensen
4508fafe16
Simplified various __eq__() methods.
2017-09-28 09:18:37 -04:00
Tim Graham
1d8cfa3608
Fixed #28626 -- Dropped support for PostgreSQL 9.3.
...
Thanks Simon Charette for the introspection changes.
2017-09-27 11:00:04 -04:00
Tim Graham
cfff2af02b
Fixed #27857 -- Dropped support for Python 3.4.
2017-09-25 17:11:03 -04:00
Tim Graham
a80903b711
Removed DatabaseFeatures.supports_microsecond_precision.
...
MySQL 5.5 (refs #28552 ) was the last database to use it.
2017-09-25 14:48:15 -04:00
Tim Graham
8a1768432b
Fixed #28552 -- Dropped support for MySQL 5.5.
2017-09-25 14:48:11 -04:00
Tim Graham
5bcca2a056
Refs #27532 -- Removed Model._meta.has_auto_field per deprecation timeline.
2017-09-22 12:51:18 -04:00
Tim Graham
4502489a46
Refs #18974 -- Removed @models.permalink() decorator per deprecation timeline.
2017-09-22 12:51:18 -04:00
Tim Graham
578711c310
Refs #27098 -- Removed DatabaseIntrospection.get_indexes() per deprecation timeline.
2017-09-22 12:51:18 -04:00
Nicolas Delaby
01d440fa1e
Fixed #27332 -- Added FilteredRelation API for conditional join (ON clause) support.
...
Thanks Anssi Kääriäinen for contributing to the patch.
2017-09-22 11:53:17 -04:00
Shai Berger
d612026c37
Refs #28595 -- Added a hook to add execute wrappers for database queries.
...
Thanks Adam Johnson, Carl Meyer, Anssi Kääriäinen, Mariusz Felisiak,
Michael Manfre, and Tim Graham for discussion and review.
2017-09-21 12:13:09 -04:00
Nicolas Delaby
a30ef353e2
Removed unused list in Query.resolve_lookup_value().
...
Unneeded since its introduction in 4f138fe5a4
.
2017-09-20 09:50:14 -04:00
Mariusz Felisiak
fb02ebe889
Fixed #28597 -- Fixed crash with the name of a model's autogenerated primary key in an Index's fields.
2017-09-18 14:06:00 -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
Mads Jensen
3939e2b4dc
Changed default value of DatabaseFeatures.has_bulk_insert to True.
2017-09-18 08:12:35 -04:00
Sergey Fedoseev
8f947730ca
Removed unneeded StdDev.convert_value() and Variance.convert_value().
...
Seems unneeded since its introduction in
f59fd15c49
.
2017-09-16 15:05:31 -04:00
Sergey Fedoseev
873858009c
Simplified Count.convert_value() and RegrCount.convert_value().
2017-09-16 14:31:51 +05:00
Tim Graham
cb362a6750
Removed unnecessary check in SQLCompiler.get_related_selections().
2017-09-15 08:37:46 -04:00
Mariusz Felisiak
c6a1faecc3
Refs #27090 -- Added real database sequence introspection.
...
Thanks Mariusz Felisiak for the Oracle part and Tim Graham for the
review.
2017-09-13 20:12:32 +02: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
Simon Charette
13be453080
Refs #28492 -- Stopped accessing settings at Field.db_tablespace initialization.
...
Deferring accesses to settings allows database fields to be initialized before
settings are loaded.
2017-09-11 12:21:49 -04:00
Jon Dufresne
99e65d6488
Fixed #28578 -- Renamed DatabaseCreation number arguments to suffix.
2017-09-11 11:32:40 -04:00
Mariusz Felisiak
a4092af3d3
Removed unnecessary parens in _get_app_label_and_model_name().
2017-09-10 21:26:06 +02: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
8b2515a450
Removed unneeded __init__() methods.
2017-09-07 08:10:49 -04:00
Sergey Fedoseev
f3c9562143
Fixed #15648 -- Allowed QuerySet.values_list() to return a namedtuple.
2017-09-06 15:32:32 -04:00
Sergey Fedoseev
5b1c389603
Refs #23919 -- Replaced usage of django.utils.functional.curry() with functools.partial()/partialmethod().
2017-09-06 13:11:18 -04:00
Sergey Fedoseev
34f27f910b
Replaced @cached_property with class attributes where possible.
2017-09-06 10:13:43 -04:00
Sergey Fedoseev
690fc30d44
Removed DatabaseWrapper.psycopg2_version.
...
Unused since 3adc5f1ee6
.
2017-09-06 09:51:56 -04:00
Sergey Fedoseev
379caf397e
Replaced deque() with list() in prefetch_related_objects().
...
deque() isn't needed since algorithm doesn't require FIFO.
2017-09-06 08:13:18 -04:00
François Freitag
ad4a8acdb5
Fixed #11557 -- Added support for a list of fields in Meta.get_latest_by and QuerySet.earliest()/latest().
2017-09-05 20:14:54 -04:00
Dima Kudosh
093fd479d6
Fixed #28335 -- Allowed query expressions in Meta.ordering.
2017-09-05 19:10:20 -04:00