[SQLObject] MySQL/PostgreSQL inconsistencies
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
|
From: Chris G. <ch...@il...> - 2004-04-17 11:10:18
|
I found some inconsistencies with the way PostgreSQL and MySQL handle
integer attributes.
I.e., you have this class:
class SO(SQLObject):
num = IntCol()
If you were to make an instance of SO (call it so), and set the num
attribute, MySQL would let you set it to a string or an int, while
PostgreSQL only lets you set it to an int, and throws a confusing exception
if you don't.
It would be best if IntCol let the user put in ints, strings, or decimal-
less floats (anything easily coercable to an int), and always spat out an
int.
|