#33214: Base DatabaseOperations missing format_for_duration_arithmetic() stub
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: Manaia
Type: | Junior
Cleanup/optimization | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Mariusz Felisiak):
For this ticket, we need to add a stub method
`format_for_duration_arithmetic(self, sql)` to the
[https://github.com/django/django/blob/9231526af4b9825583b0d3cb943f88109fd30551/django/db/backends/base/operations.py#L14
BaseDatabaseOperations] that would raise `NotImplementedError` e.g.
{{{#!python
raise NotImplementedError('subclasses of BaseDatabaseOperations may
require a format_for_duration_arithmetic() method.')
}}}
Test for such methods are in
[https://github.com/django/django/blob/9231526af4b9825583b0d3cb943f88109fd30551/tests/backends/base/test_operations.py#L88-L118
tests/backends/base/test_operations.py].
--
Ticket URL: <https://code.djangoproject.com/ticket/33214#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/067.a9587ba3871116b3718649808d846939%40djangoproject.com.