Opened 16 years ago

Closed 16 years ago

#7860 closed (duplicate)

db backends supports usecs feature in get_db_prep_lookup

Reported by: wei guangjing Owned by: nobody
Component: Database layer (models, ORM) Version: dev
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The supports usecs feature not use in DateTimeField get_db_prep_lookp, so Datetime lookup will fail use MS SQL Server backend.
For example:

s = Session.objects.get(
                session_key = self.session_key,
                expire_date__gt=datetime.datetime.now()
            )

Attachments (1)

fix_supports_usecs.diff (2.4 KB ) - added by wei guangjing 16 years ago.
fix supports usecs in DatetimeField, DateField, TimeField in get_db_prep_lookup

Download all attachments as: .zip

Change History (6)

by wei guangjing, 16 years ago

Attachment: fix_supports_usecs.diff added

fix supports usecs in DatetimeField, DateField, TimeField in get_db_prep_lookup

comment:1 by Adam Vandenberg, 16 years ago

There is no built-in SQL Server backend (anymore); if you could log a bug with a repro case against the specific backend (django-pyodbc, django-mssql, etc.) that would be greatly appreciated (by the maintainers of those projects.)

comment:2 by Alex Gaynor, 16 years ago

I believe wgj is referring to an external backend.

comment:3 by Ramiro Morales, 16 years ago

This would be solved in a more clean and generic way by #7560 that is targeted at the 1.0 beta.

(The addition of the supports_usecs feature was part of #7420 that was partially applied in [7643], the intent was coincidentally facilitate the creation of an external MS SQL Server backend. But the feature wouldn't be needed anymore once #7560 lands.)

comment:4 by Adam Vandenberg, 16 years ago

Very much +1 for #7560 (as I maintain the django-mssql backend...)

comment:5 by Malcolm Tredinnick, 16 years ago

Resolution: duplicate
Status: newclosed

Yes, #7560 is the way we're going. I'm going to close this one as a "duplicate" of that (since there's not a "better solved by..." resolution).

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