> For ruby-mysql and all three ruby postgres drivers (pg, postgres, and
> postgres-pr), the driver itself returns column values as strings, but
> it also gives you column type information that you can use to typecast
> those strings.  Sequel uses that column type information to typecast
> such values correctly.  See
> http://github.com/jeremyevans/sequel/blob/master/lib/sequel/adapters/postgres.rb#L95
> and 
> http://github.com/jeremyevans/sequel/blob/master/lib/sequel/adapters/mysql.rb#L26
> for an examples of conversion procs used based on the column type
> number.
>
> I'm not saying ActiveRecord should take that approach, I'm just saying
> the information is there, at least for those drivers.

I stand corrected!

I believe the oracle / mssql drivers do this typecasting interally and
that still feels cleaner, however if someone wanted to take a look at
that logic and pull it into the postgres / mysql adapters we can see
what breaks / doesn't.


-- 
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 rubyonrails-core@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-core+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to