mirror of
https://github.com/django/django.git
synced 2025-07-23 13:15:32 +00:00
Fixed #24793 -- Unified temporal difference support.
This commit is contained in:
parent
31098e3288
commit
766afc22a1
14 changed files with 135 additions and 2 deletions
|
@ -201,7 +201,7 @@ CSRF
|
|||
Database backends
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
* ...
|
||||
* Temporal data subtraction was unified on all backends.
|
||||
|
||||
Email
|
||||
~~~~~
|
||||
|
@ -398,6 +398,13 @@ Database backend API
|
|||
from the database are now converted to ``float`` to make it easier to combine
|
||||
them with values used by the GIS libraries.
|
||||
|
||||
* In order to enable temporal subtraction you must set the
|
||||
``supports_temporal_subtraction`` database feature flag to ``True`` and
|
||||
implement the ``DatabaseOperations.subtract_temporals()`` method. This
|
||||
method should return the SQL and parameters required to compute the
|
||||
difference in microseconds between the ``lhs`` and ``rhs`` arguments in the
|
||||
datatype used to store :class:`~django.db.models.DurationField`.
|
||||
|
||||
``select_related()`` prohibits non-relational fields for nested relations
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue