Opened 10 years ago

Closed 10 years ago

#24033 closed Cleanup/optimization (fixed)

Reimplement Interval type on Oracle

Reported by: Shai Berger Owned by: Marc Tamlyn
Component: Database layer (models, ORM) Version: dev
Severity: Release blocker Keywords: oracle interval
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

This is essentially a spin-off from #2443: The Interval type was implemented for Oracle, but it is using the default implementation of a bigint counting microseconds, instead of Oracle's built-in Interval type. We need to use the Interval type, and do so before a version with intervals is released, because changing the field type later will be very hard.

The ticket is marked as a blocker and accepted following an IRC discussion with mjtamlyn.

Change History (3)

comment:1 by Marc Tamlyn, 10 years ago

Has patch: set
Owner: changed from Shai Berger to Marc Tamlyn
Status: newassigned
Triage Stage: AcceptedReady for checkin

comment:2 by Shai Berger, 10 years ago

Patch needs improvement: set
Triage Stage: Ready for checkinAccepted

Almost perfect; I commented on the PR.

comment:3 by Marc Tamlyn <marc.tamlyn@…>, 10 years ago

Resolution: fixed
Status: assignedclosed

In 5ca82e710e2f92b8c5114492205c8764918407d3:

Fixed #24033 -- Use interval type on Oracle.

Use INTERVAL DAY(9) TO SECOND(6) for Durationfield on Oracle rather than
storing as a NUMBER(19) of microseconds.

There are issues with cx_Oracle which require some extra data
manipulation in the database backend when constructing queries, but it
handles the conversion back to timedelta objects cleanly.

Thanks to Shai for the review.

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