Home | Trees | Indices | Help |
|
---|
|
object --+ | property --+ | datatype --+ | datetime_base
SQL backends approach these problems in diverse ways, which must be handled by specific classes in the backend's datatype module. Fortunately they all share a common denominator which I'm trying to work with here. There are three classes: date, time and datetime. On the Python side they use the datetime module (the timedelta, date and datetime classes for the time, data and datetime datatype respectively). Values provided as mx.DateTime instances by the database will be converted. Towards the database it will convert these into ISO compliant date representations, quoted like SQL string literals. This is going to just work in most situations.
If anyone feels like writing custom datetime datatypes for specific backends, mapping Python's new datatypes to PostgreSQL's timezone or DateTimeDelta capabilities or MySQL's ability to store illegal dates (with 0s in it), they are very welcome!
|
|||
|
sql_literal(self,
dbobj) Return an SQL literal representing the data managed by this property in dbobj. |
||
| __set_from_result__(self, ds, dbobj, value) | ||
|
__convert__(self,
value) Return value converted as a Python object of the class assigned to this datatype. |
||
| datetime_as_string(self, value) | ||
Inherited from Inherited from Inherited from |
|
|||
Inherited from Inherited from |
|
|||
Inherited from |
|
|
|
|
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0alpha3 on Wed Feb 20 18:17:25 2008 | http://epydoc.sourceforge.net |