Britt Selvitelle
2005-Feb-16 23:51 UTC
[PATCH] SQLServer and float scale info returned from the db
I''ve thought about this a bit more ... The problem is that Ruby keys are not numeric values, but strings. So 2 and 2.0 ARE and should be treated as different values. But on to the real problem ... ruby formats floats with a decimal remainder, even if SQLServer returns a scale of 0 (meaning that there is no decimal ... it is essentially an integer value). So when the database says, "hey, this is to be represented with a scale of 0, as an integer", we should do that (and it should be handled in the connection adapters ... I''m not sure how other databases like postgres handle scale. Maybe someone could report on this?). I''ve included a patch with the fix, to be applied to sqlserver_adapter.rb. I''ll file a bugreport and attach the patch there as well. Does this sound reasonable to everyone? Britt _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails