#25774: Refactor of datetime expressions and better, official support for right-
hand-side date part extraction
-------------------------------------+-------------------------------------
     Reporter:  ryuusenshi           |                    Owner:  nobody
         Type:  New feature          |                   Status:  new
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
  db,expressions,date,time,extract,transform|
    Has patch:  1                    |      Needs documentation:  1
  Needs tests:  1                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by jarshwah):

 * stage:  Unreviewed => Accepted


Comment:

 I think you're on the right track for most of these points. I'm not yet
 convinced that adding `DateExtract` is necessary, but once the patch is
 written I'll take another look then. I just worry that there'll be two
 ways to extract a date part and that may lead to confusion.

 Would like others opinions on ExtractX rather than XExtract. I think it
 reads and sorts better.

 YearLookup and YearComparisonLookup are going to be interesting. They'll
 still need to work the same way when used on the left hand side. Perhaps
 we can rename to YearLookupOptimised (for example, that's a bad name) and
 register that as a lookup, but provide a different ExtractYear that does
 what you'd expect on the right hand side. The optimised version would then
 just be a hidden implementation detail that users shouldn't touch
 themselves.

 I'll have a look at the actual PR tomorrow. Great work so far.

--
Ticket URL: <https://code.djangoproject.com/ticket/25774#comment:2>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.8780ec1184a492b977da0f5812fadc56%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to