Hello,
On Mon, 2006-06-05 at 14:39 -0400, Michael Bayer wrote:
> so..... does that just mean instead of sending a dictionary to
> Dialect/create_engine(), we send a TypePolicy object ?  

This seems like a lot of overhead for very little gain as well as not
solving the problem.  In theory the DBAPI modules already know the best,
most efficient DB to Python data type mapping.  The fact that Python
didn't have a Decimal (quasi-infinite precision) numeric type was
why psycopg1 used float.  The problem of course it that float is
a "lossy" type, sometime try round tripping 0.1 through a Decimal
data type (the expression "dbvalue == 0.1" returns False).

The difficulty with mixing mxDateTime objects with the current
python Datetime objects is another example.   The mxDateTime
objects work better, why the Datetime module was not made a
compatible superset seems a poor decision to me.  The only
suspicion that I have about that is that it would have
undermined the "commercial" sale of the mxDateTime modules.

Consider the fact that psycopg2 implements user defined data
types.  Now how should a "TypePolicy" react to that?  Bottom line
is that if someone has specialized needs for data type mapping
let them override to get the expected behavior.  Please keep it
out of the common code.

Thanks,
William.





_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to