Em 03-11-2009 04:41, Michael Koziarski escreveu:
>> 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.
>
>
>    
It happens that at this moment I'm very late on a project, but as soon I 
finish it (in about 3 months), I'll take a look again on this subject.

There is already another patch I would like to send that I am 
postponning: allow a further option ':full_message' in validations. It 
will also have to wait...

But at least now I know there is no problem in submitting such patch.

Thank you,

Rodrigo.


--~--~---------~--~----~------------~-------~--~----~
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