#1275 unconfirmed
Xavier Shay

[BUG] Raw SQL select truncates decimal values

Reported by Xavier Shay | May 18th, 2010 @ 08:10 PM

Observe:

irb(main):003:0> repository.adapter.select("SELECT SUM(1.5) FROM DUAL")
=> [1]
irb(main):004:0> repository.adapter.select("SELECT 1.5 FROM DUAL")
=> [1]

I don't have a fix

Comments and changes to this ticket

  • Dan Kubb (dkubb)

    Dan Kubb (dkubb) May 21st, 2010 @ 04:38 PM

    • Assigned user set to “Dirkjan Bussink”

    Assigning this to dbussink for now, until rsim accepts the invite I sent him for LH.

    Should we add some specs to DO that ensures coercion for raw queries can be performed relatively consistently? I can understand if some DBs make it more difficult than others to identify what the return type is, but when it is possible to know, I think we should coerce.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Tags

Pages