[SQLObject] partial fix for DateTimeCol and Postgres
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Bud P. B. <bu...@si...> - 2003-04-14 15:19:15
|
Ian and all, here is a partial fix for DateTimeCol and PostgreSQL. The problem is that DATETIME is not defined, but TIMESTAMP should be used. fix: I changed the DateTime class in Col.py to the following: --------------------------------------------- class DateTimeCol(Col): def _mysqlType(self): return 'DATETIME' def _postgresType(self): return 'TIMESTAMP' --------------------------------------------- After this, the following seems to work ok: * creates tables with DateTimeCols correctly (I believe) * new seems to work correctly and insert a timestamp value * the DateTime attribute can be accessed and is of type DateTime But I found at least one remaining problem: * after assigning a different value to the DateTime attribute, it's type changes to string!!! For details, I attach the test routine I used and its output. Will try to get a BooleanCol working... --b |