summaryrefslogtreecommitdiff
path: root/django/db/backends/base/features.py
Commit message (Collapse)AuthorAgeFilesLines
* Fixed #470 -- Added support for database defaults on fields.Ian Foote2023-05-121-0/+12
| | | | | | | | Special thanks to Hannes Ljungberg for finding multiple implementation gaps. Thanks also to Simon Charette, Adam Johnson, and Mariusz Felisiak for reviews.
* Fixed #33759 -- Avoided unnecessary subquery in QuerySet.delete() with ↵4the4ryushin2023-05-011-0/+3
| | | | self-referential subqueries if supported.
* Fixed #34176 -- Fixed grouping by ambiguous aliases.Simon Charette2023-01-091-1/+1
| | | | | | | | | | | | | | | Regression in b7b28c7c189615543218e81319473888bc46d831. Refs #31377. Thanks Shai Berger for the report and reviews. test_aggregation_subquery_annotation_values_collision() has been updated as queries that are explicitly grouped by a subquery should always be grouped by it and not its outer columns even if its alias collides with referenced table columns. This was not possible to accomplish at the time 10866a10 landed because we didn't have compiler level handling of colliding aliases.
* Fixed #14094 -- Added support for unlimited CharField on PostgreSQL.Adrian Torres2022-12-281-0/+3
| | | | Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
* Fixed #18468 -- Added support for comments on columns and tables.kimsoungryoul2022-12-281-0/+5
| | | | | | | | Thanks Jared Chung, Tom Carrick, David Smith, Nick Pope, and Mariusz Felisiak for reviews. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com> Co-authored-by: Nick Pope <nick@nickpope.me.uk>
* Fixed #33308 -- Added support for psycopg version 3.Daniele Varrazzo2022-12-151-0/+5
| | | | | | | Thanks Simon Charette, Tim Graham, and Adam Johnson for reviews. Co-authored-by: Florian Apolloner <florian@apolloner.eu> Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
* Refs #17144 -- Removed support for grouping by primary key.Simon Charette2022-11-071-1/+0
| | | | | No core backend require the feature anymore as it was only added to support a MySQL'ism that has been deprecated since then.
* Refs #33308 -- Enabled explicit GROUP BY and ORDER BY aliases.Simon Charette2022-10-061-0/+1
| | | | | | | This ensures explicit grouping from using values() before annotating an aggregate function groups by selected aliases if supported. The GROUP BY feature is disabled on Oracle because it doesn't support it.
* Fixed #33768 -- Fixed ordering compound queries by nulls_first/nulls_last on ↵Simon Charette2022-10-051-0/+1
| | | | | | | | | | | MySQL. Columns of the left outer most select statement in a combined query can be referenced by alias just like by index. This removes combined query ordering by column index and avoids an unnecessary usage of RawSQL which causes issues for backends that specialize the treatment of null ordering.
* Fixed #33996 -- Fixed CheckConstraint validation on NULL values.David Sanders2022-09-131-0/+3
| | | | | | Bug in 667105877e6723c6985399803a364848891513cc. Thanks James Beith for the report.
* Fixed #32234 -- Made inspectdb inform about composite primary keys.Anv3sh2022-06-011-0/+4
|
* Refs #27064 -- Added RenameIndex migration operation.David Wobrock2022-05-121-0/+3
|
* Removed DatabaseFeatures.validates_explain_options.Mariusz Felisiak2022-04-111-4/+0
| | | Always True since 6723a26e59b0b5429a0c5873941e01a2e1bdbb81.
* Fixed #29865 -- Added logical XOR support for Q() and querysets.Ryan Heard2022-03-041-0/+3
|
* Fixed #33379 -- Added minimum database version checks.Hasan Ramezani2022-02-181-0/+2
| | | | Thanks Tim Graham for the review.
* Refs #33476 -- Reformatted code with Black.django-bot2022-02-071-25/+25
|
* Fixed #31685 -- Added support for updating conflicts to QuerySet.bulk_create().sean_c_hsu2022-01-191-0/+4
| | | | | Thanks Florian Apolloner, Chris Jerdonek, Hannes Ljungberg, Nick Pope, and Mariusz Felisiak for reviews.
* Fixed #33224 -- Removed ↵Hasan Ramezani2021-11-021-3/+0
| | | | DatabaseFeatures.supports_mixed_date_datetime_comparisons.
* Fixed #33228 -- Changed value of ↵Chinmoy2021-10-281-1/+1
| | | | BaseDatabaseFeatures.has_case_insensitive_like to False.
* Refs #10929 -- Allowed NowUTC SQL customization for third-party backends.Tim Graham2021-08-241-0/+2
|
* Fixed #32786 -- Moved subquery ordering clearing optimization to the _in lookup.Hannes Ljungberg2021-06-301-0/+3
| | | | Co-Authored-By: Simon Charette <charette.s@gmail.com>
* Refs #26167 -- Changed default value of ↵Hannes Ljungberg2021-01-141-1/+1
| | | | DatabaseFeatures.supports_expression_indexes to True.
* Fixed #26167 -- Added support for functional indexes.Hannes Ljungberg2021-01-131-0/+4
| | | | | | Thanks Simon Charette, Mads Jensen, and Mariusz Felisiak for reviews. Co-authored-by: Markus Holtermann <info@markusholtermann.eu>
* Refs #32178 -- Changed BaseDatabaseFeatures.django_test_expected_failures to ↵Hasan Ramezani2020-12-111-1/+1
| | | | set().
* Fixed #32178 -- Allowed database backends to skip tests and mark expected ↵Hasan Ramezani2020-12-101-0/+7
| | | | | failures. Co-authored-by: Tim Graham <timograham@gmail.com>
* Fixed #32179 -- Added JSONObject database function.Artur Beltsov2020-12-021-0/+2
|
* Replaced @no_oracle skips with DatabaseFeatures.allows_group_by_lob.Tim Graham2020-10-221-0/+2
|
* Fixed #32120 -- Added DatabaseFeatures.indexes_foreign_keys.Tim Graham2020-10-201-0/+3
|
* Fixed #31777 -- Added support for database collations to Char/TextFields.Tom Carrick2020-09-211-0/+7
| | | | Thanks Simon Charette and Mariusz Felisiak for reviews.
* Refs #21181 -- Corrected DatabaseFeatures.test_collations for Swedish collation.Tom Carrick2020-09-181-1/+1
| | | | Previously, backends used different keys "swedish-ci" or "swedish_ci".
* Fixed #21181 -- Added Collate database function.Tom Carrick2020-08-111-0/+7
| | | | Thanks Simon Charette for reviews.
* Refs #31829 -- Added ↵Tim Graham2020-07-301-0/+3
| | | | | DatabaseFeatures.json_key_contains_list_matching_requires_list. CockroachDB's behavior matches PostgreSQL.
* Fixed #31836 -- Dropped support for JSONField __contains and __contained_by ↵Mariusz Felisiak2020-07-281-0/+3
| | | | | | | | | | lookups on SQLite. The current implementation works only for basic examples without supporting nested structures and doesn't follow "the general principle that the contained object must match the containing object as to structure and data contents, possibly after discarding some non-matching array elements or object key/value pairs from the containing object".
* Fixed #17653 -- Allowed using zero as AutoFields value on MySQL if ↵Mariusz Felisiak2020-07-201-1/+1
| | | | NO_AUTO_VALUE_ON_ZERO SQL mode is enabled.
* Fixed #31758 -- Removed unneeded BytesToCharFieldConversionMixin.Sergey Fedoseev2020-07-021-3/+0
| | | Bug was fixed in mysqlclient 1.3.13.
* Fixed #30913 -- Added support for covering indexes on PostgreSQL 11+.Hannes Ljungberg2020-06-041-0/+2
|
* Refs #31630 -- Added CharField and IntegerField to ↵Tim Graham2020-06-041-0/+2
| | | | | | | DatabaseFeatures.introspected_field_types. CockroachDB introspects CharField as TextField and IntegerField as BigIntegerField.
* Refs #31630 -- Removed DatabaseFeatures.can_introspect_autofield.Tim Graham2020-06-041-3/+1
|
* Fixed #31630 -- Replaced introspection features with ↵Hasan Ramezani2020-06-041-32/+16
| | | | DatabaseFeatures.introspected_field_types.
* Fixed #30375 -- Added FOR NO KEY UPDATE support to ↵Manuel Weitzman2020-05-211-0/+1
| | | | QuerySet.select_for_update() on PostgreSQL.
* Refs #12990 -- Added DatabaseFeatures.has_json_operators.Tim Graham2020-05-181-0/+2
| | | CockroachDB also has them.
* Fixed #31584 -- Fixed crash when chaining values()/values_list() after ↵Mariusz Felisiak2020-05-141-1/+2
| | | | | | | | Exists() annotation and aggregation on Oracle. Oracle requires the EXISTS expression to be wrapped in a CASE WHEN in the GROUP BY clause. Regression in efa1908f662c19038a944129c81462485c4a9fe8.
* Fixed #12990, Refs #27694 -- Added JSONField model field.sage2020-05-081-0/+9
| | | | | | | | | | | Thanks to Adam Johnson, Carlton Gibson, Mariusz Felisiak, and Raphael Michel for mentoring this Google Summer of Code 2019 project and everyone else who helped with the patch. Special thanks to Mads Jensen, Nick Pope, and Simon Charette for extensive reviews. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
* Fixed #20581 -- Added support for deferrable unique constraints.Ian Foote2020-04-301-0/+2
|
* Fixed #31376 -- Optimized nulls ordering when possible on SQLite and MySQL.Simon Charette2020-03-181-0/+3
| | | | | | | Both backends order NULLs first on ascending ordering and last on descending ordering which makes ORDER BY IS (NOT)? NULL wasteful when asc(nulls_first) and desc(nulls_last) are used since it prevents indice usage.
* Simplified imports from django.db and django.contrib.gis.db.Nick Pope2020-02-041-1/+1
|
* Fixed #31183 -- Added a feature flag for "<db> only supports UNBOUNDED ↵Tim Graham2020-01-201-0/+1
| | | | together with PRECEDING and FOLLOWING".
* Refs #13312 -- Simplified handling of nulls ordering on MySQL.Nick Pope2019-11-041-0/+3
| | | | | | | MySQL & MariaDB support the standard IS NULL and IS NOT NULL so the same workaround used for NULLS FIRST and NULLS LAST that is used for SQLite < 3.30.0 can be used. Thanks Simon Charette for the discussion.
* Refs #29444 -- Removed redundant ↵Mariusz Felisiak2019-09-241-1/+0
| | | | | | DatabaseFeatures.can_return_multiple_columns_from_insert. Unnecessary since b31e63879eb5d9717e9f890401f7222e4f00c910.
* Fixed #28107 -- Added ↵Vojtech Bocek2019-09-091-0/+5
| | | | DatabaseFeatures.allows_group_by_selected_pks_on_model() to allow enabling optimization for unmanaged models.