On Mon, Feb 6, 2012 at 10:59 AM, Michael Bayer <mike...@zzzcomputing.com> wrote:
>
> Attached is a patch that allows "coerce_to_decimal" to be passed to 
> create_engine() and will disable the output handling if passed as False.   Do 
> you want to give it a try, I can commit it for 0.7.6 if it does the trick.

It passed my very cursory testing.  (Select a Number column, and the
resulting type is float.)

It looks roughly 20-30% slower than using cx_Oracle without SqlAlchemy
(or deactivating the outputtypehandler completely).  That compares to
about 100% slower for using cdecimal, and 900% for using the stdlib
decimal.

I'll probably still stick with my hack though.  We should definitely
head towards using decimal: I don't think the original writers
realized they were losing precision, and most of those number fields
are going to go away in the redesign.  Leaving my hack means that the
conversion to decimal will only hit code as I update it.

But if there are issues, it's sure nice to have that switch in the patch.

-- 
--Anthony

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to