2006/1/7, Michael Bayer <[EMAIL PROTECTED]>:
>
> OK, most databases dont even store dates as a string value, instead using
> an internal object format that is translated by the DBAPI layer into
> datetime objects.  the string date thing is a "feature" of SQLite.  So for
> SQLite, we just make a guess as to a decent date format.  If you are
> storing dates in arbitrary character formats, I would recommend just
> subclassing the sqlalchemy.databases.sqlite.SLDate object date type
> yourself and modifying the guts to work with your specific format....that
> type can be used directly in table definitions.
>
> Im not sure yet if I want to get into that whole "theres three different
> date objects, with/without date, with/without time" thing, on the Python
> side...mostly because I am not sure if DBAPIs really deal with the "date"
> and "time" objects separately instead of just the "datetime"...but I will
> examine this further.  The type objects would then become types.Date,
> types.Time, and types.DateTime.  The "caps" datetime types I think need a
> little work since some of them seem redundant...I just threw them in there
> to start with.
>

I think Date and DateTime may be hit the most cases. I also checked
the SQLObject module, there are DateCol and DateTimeCol in it, and in
Django, there are TimeField, DateField, and DateTimeField. But I think
TimeField in django is in order to create web widget easily.

--
I like python!
My Blog: http://www.donews.net/limodou
NewEdit Maillist: http://groups.google.com/group/NewEdit


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to