mirror of
https://github.com/django/django.git
synced 2025-05-04 22:17:34 +00:00
Refs #33996 -- Updated CheckConstraint validation on NULL values on Oracle 23c+.
Oracle 23c supports comparing boolean expressions.
This commit is contained in:
parent
cbf1e87398
commit
36a000858b
@ -78,7 +78,6 @@ class DatabaseFeatures(BaseDatabaseFeatures):
|
|||||||
supports_slicing_ordering_in_compound = True
|
supports_slicing_ordering_in_compound = True
|
||||||
requires_compound_order_by_subquery = True
|
requires_compound_order_by_subquery = True
|
||||||
allows_multiple_constraints_on_same_fields = False
|
allows_multiple_constraints_on_same_fields = False
|
||||||
supports_comparing_boolean_expr = False
|
|
||||||
supports_json_field_contains = False
|
supports_json_field_contains = False
|
||||||
supports_collation_on_textfield = False
|
supports_collation_on_textfield = False
|
||||||
test_now_utc_template = "CURRENT_TIMESTAMP AT TIME ZONE 'UTC'"
|
test_now_utc_template = "CURRENT_TIMESTAMP AT TIME ZONE 'UTC'"
|
||||||
@ -174,6 +173,10 @@ class DatabaseFeatures(BaseDatabaseFeatures):
|
|||||||
def supports_boolean_expr_in_select_clause(self):
|
def supports_boolean_expr_in_select_clause(self):
|
||||||
return self.connection.oracle_version >= (23,)
|
return self.connection.oracle_version >= (23,)
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def supports_comparing_boolean_expr(self):
|
||||||
|
return self.connection.oracle_version >= (23,)
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
def supports_aggregation_over_interval_types(self):
|
def supports_aggregation_over_interval_types(self):
|
||||||
return self.connection.oracle_version >= (23,)
|
return self.connection.oracle_version >= (23,)
|
||||||
|
@ -131,10 +131,10 @@ ensures the age field is never less than 18.
|
|||||||
name="age_gte_18_and_others",
|
name="age_gte_18_and_others",
|
||||||
)
|
)
|
||||||
|
|
||||||
.. admonition:: Oracle
|
.. admonition:: Oracle < 23c
|
||||||
|
|
||||||
Checks with nullable fields on Oracle must include a condition allowing for
|
Checks with nullable fields on Oracle < 23c must include a condition
|
||||||
``NULL`` values in order for :meth:`validate() <BaseConstraint.validate>`
|
allowing for ``NULL`` values in order for :meth:`~BaseConstraint.validate`
|
||||||
to behave the same as check constraints validation. For example, if ``age``
|
to behave the same as check constraints validation. For example, if ``age``
|
||||||
is a nullable field::
|
is a nullable field::
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user