Renamed the allow_sliced_subqueries database feature to allow_sliced_subqueries_with_in.

After 0899d583bd this database feature is
false only on MySQL which doesn't support sliced subqueries only with
IN/ALL/ANY/SOME.
This commit is contained in:
Mariusz Felisiak 2018-02-07 08:27:47 +01:00 committed by GitHub
parent 47268242b0
commit 34b52f8572
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 3 deletions

View File

@ -32,7 +32,7 @@ class BaseDatabaseFeatures:
# If True, don't use integer foreign keys referring to, e.g., positive
# integer primary keys.
related_fields_match_type = False
allow_sliced_subqueries = True
allow_sliced_subqueries_with_in = True
has_select_for_update = False
has_select_for_update_nowait = False
has_select_for_update_skip_locked = False

View File

@ -7,7 +7,8 @@ class DatabaseFeatures(BaseDatabaseFeatures):
update_can_self_select = False
allows_group_by_pk = True
related_fields_match_type = True
allow_sliced_subqueries = False
# MySQL doesn't support sliced subqueries with IN/ALL/ANY/SOME.
allow_sliced_subqueries_with_in = False
has_select_for_update = True
has_select_for_update_nowait = False
supports_forward_references = False

View File

@ -234,6 +234,9 @@ Database backend API
feature are changed from :exc:`NotImplementedError` to
:exc:`django.db.NotSupportedError`.
* Renamed the ``allow_sliced_subqueries`` database feature flag to
``allow_sliced_subqueries_with_in``.
:mod:`django.contrib.gis`
-------------------------

View File

@ -2028,7 +2028,7 @@ class QuerysetOrderedTests(unittest.TestCase):
self.assertIs(qs.order_by('num_notes').ordered, True)
@skipUnlessDBFeature('allow_sliced_subqueries')
@skipUnlessDBFeature('allow_sliced_subqueries_with_in')
class SubqueryTests(TestCase):
@classmethod
def setUpTestData(cls):