Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#23867 closed Cleanup/optimization (fixed)

Remove hacks required by .dates() queries

Reported by: Anssi Kääriäinen Owned by: nobody
Component: Database layer (models, ORM) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The dates() queries implementation uses custom QuerySet, Query and Compiler classes. Before expressions and database value converters were added there were no other way to convert the database values than addition of these subclasses to hack around the limitations in Django. But now with expressions and converters support it is possible to implement the dates queries by using public APIs only.

This is implemented in https://github.com/django/django/pull/3570.

As I don't think anybody wants to keep the old way around, and also I think the patch is ready for merge, so I'll mark this directly as ready for checkin.

Change History (3)

comment:1 by Tim Graham <timograham@…>, 9 years ago

Resolution: fixed
Status: newclosed

In cbb5cdd155668ba771cad6b975676d3b20fed37b:

Fixed #23867 -- removed DateQuerySet hacks

The .dates() queries were implemented by using custom Query, QuerySet,
and Compiler classes. Instead implement them by using expressions and
database converters APIs.

comment:2 by Tim Graham <timograham@…>, 9 years ago

In e9fdecf9:

Removed DateTimeQuerySet from docs.

Obsolete since refs #23867.

comment:3 by Tim Graham <timograham@…>, 9 years ago

In ae47854:

[1.8.x] Removed DateTimeQuerySet from docs.

Obsolete since refs #23867.

Backport of e9fdecf98417e39a93c81a854a780550321a9795 from master

Note: See TracTickets for help on using tickets.
Back to Top