On Saturday, 14 January 2012 at 8:37 AM, Ken Collins wrote:

> 
> I remember a long time ago I had a patch for average that would trust what 
> the DB returned, in my case integers.
> 
> https://github.com/rails/rails/commit/95d5d9b6c48c08f1fba0c77ecbc97b62b2603824
> 
> It would be nice if calculations could always rely on the raw_connection to 
> return data types converted to ruby primitives correctly. Not sure if that 
> '0' should be a 0 or not, maybe be helpful to see what fails if changed?
> 
>  - Ken
That '0' likely just predates the raw_connection returning rich data types.  I 
believe sql server and oracle have done so for ages, but it's relatively new 
for the other adapters.  

In preparation for 4.0 perhaps we could do an audit of the  various database 
drivers and make sure they return the correct types.  After that we could 
remove the custom typecasting we do?


-- 
Cheers,

Koz

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to