summaryrefslogtreecommitdiff
path: root/django/db/backends
diff options
context:
space:
mode:
Diffstat (limited to 'django/db/backends')
-rw-r--r--django/db/backends/base/features.py3
-rw-r--r--django/db/backends/mysql/features.py1
-rw-r--r--django/db/backends/sqlite3/features.py1
3 files changed, 5 insertions, 0 deletions
diff --git a/django/db/backends/base/features.py b/django/db/backends/base/features.py
index 4058b10a5e..14092e793e 100644
--- a/django/db/backends/base/features.py
+++ b/django/db/backends/base/features.py
@@ -88,6 +88,9 @@ class BaseDatabaseFeatures:
# Does the backend order NULL values as largest or smallest?
nulls_order_largest = False
+ # Does the backend support NULLS FIRST and NULLS LAST in ORDER BY?
+ supports_order_by_nulls_modifier = True
+
# The database's limit on the number of query parameters.
max_query_params = None
diff --git a/django/db/backends/mysql/features.py b/django/db/backends/mysql/features.py
index 6a7f87ba27..9aaae2b5da 100644
--- a/django/db/backends/mysql/features.py
+++ b/django/db/backends/mysql/features.py
@@ -50,6 +50,7 @@ class DatabaseFeatures(BaseDatabaseFeatures):
db_functions_convert_bytes_to_str = True
# Neither MySQL nor MariaDB support partial indexes.
supports_partial_indexes = False
+ supports_order_by_nulls_modifier = False
@cached_property
def _mysql_storage_engine(self):
diff --git a/django/db/backends/sqlite3/features.py b/django/db/backends/sqlite3/features.py
index c82be5c30d..6aebbc3262 100644
--- a/django/db/backends/sqlite3/features.py
+++ b/django/db/backends/sqlite3/features.py
@@ -44,3 +44,4 @@ class DatabaseFeatures(BaseDatabaseFeatures):
supports_over_clause = Database.sqlite_version_info >= (3, 25, 0)
supports_frame_range_fixed_distance = Database.sqlite_version_info >= (3, 28, 0)
supports_aggregate_filter_clause = Database.sqlite_version_info >= (3, 30, 1)
+ supports_order_by_nulls_modifier = Database.sqlite_version_info >= (3, 30, 0)