I just upgraded to 0.6.2 and the new handling of Decimal for Oracle is
giving me trouble.  More specifically, I have a query that's pulling
data from a pipeline function (e.g., "SELECT * FROM TABLE (func
(:a,:b,:c))").  In previous SA versions, a couple of the columns were
"correctly" returned as integers.  Now, they're being returned as
Decimal and that's causing trouble downstream.

I understand that the new behavior is probably more accurate and I
know that I can convert the data to integers when I reference the
columns; however, I'd prefer to deal with the conversion closer to the
source.  Unfortunately, I can't figure out how to do that though I
suspect it's pretty simple.

I did find this in the documentation: "Type objects are supplied to
Table definitions and can be supplied as type hints to functions for
occasions where the database driver returns an incorrect type."  The
"type hints" sound promising; however, I can't find any other
reference to that.

When I originally wrote this section of code I was thinking it would
be nice to use a mapper to make this query look like a table to the
rest of the application.  Perhaps I could define the column types that
way.  However, the bind variables would seem to cause problems with
that.

So, what's a good way to tell SA about the types of the columns
returned by the query?

Thanks

Rodney

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@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