mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Refs #12990 -- Added DatabaseFeatures.has_json_operators.
CockroachDB also has them.
This commit is contained in:
@@ -309,6 +309,8 @@ class BaseDatabaseFeatures:
|
||||
supports_primitives_in_json_field = True
|
||||
# Is there a true datatype for JSON?
|
||||
has_native_json_field = False
|
||||
# Does the backend use PostgreSQL-style JSON operators like '->'?
|
||||
has_json_operators = False
|
||||
|
||||
def __init__(self, connection):
|
||||
self.connection = connection
|
||||
|
||||
@@ -58,6 +58,7 @@ class DatabaseFeatures(BaseDatabaseFeatures):
|
||||
supported_explain_formats = {'JSON', 'TEXT', 'XML', 'YAML'}
|
||||
validates_explain_options = False # A query will error on invalid options.
|
||||
supports_deferrable_unique_constraints = True
|
||||
has_json_operators = True
|
||||
|
||||
@cached_property
|
||||
def is_postgresql_10(self):
|
||||
|
||||
Reference in New Issue
Block a user