#2443: Add IntervalField to database models
-------------------------------------+-------------------------------------
     Reporter:  ben.tucker@…         |                    Owner:  Adys
         Type:  New feature          |                   Status:  new
    Component:  Database layer       |                  Version:  SVN
  (models, ORM)                      |               Resolution:
     Severity:  Normal               |             Triage Stage:  Accepted
     Keywords:  IntervalField        |      Needs documentation:  0
  interval duration DurationField    |  Patch needs improvement:  1
  feature                            |                    UI/UX:  1
    Has patch:  1                    |
  Needs tests:  1                    |
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by smcoll):

 Replying to [comment:50 jpaulett]:
 > While Python does provide the timedelta class, there is no common SQL
 implementation for storing that object in the database.  PostgreSQL does
 provide the INTERVAL data type, MySQL and SQLite do not have any interval
 data type (I am not sure about Oracle, MSSQL, etc.).

 What about MySQL's TIME type?

 "MySQL retrieves and displays TIME values in 'HH:MM:SS' format (or
 'HHH:MM:SS' format for large hours values). TIME values may range from
 '-838:59:59' to '838:59:59'. The hours part may be so large because the
 TIME type can be used not only to represent a time of day (which must be
 less than 24 hours), but also elapsed time or a time interval between two
 events (which may be much greater than 24 hours, or even negative)."

 http://dev.mysql.com/doc/refman/5.0/en/time.html

-- 
Ticket URL: <https://code.djangoproject.com/ticket/2443#comment:52>
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to