rowland/fb — pull request #37 by vizcay (2014-08-31 03:50:55+00:00)
Title: better handling of SQL_SHORT, SQL_LONG & SQL_INT64 datatypes

Rowland:

I've refactored all the code that reads and writes SQL_SHORT, SQL_LONG & SQL_INT64 (scaled and not) and removed all the in between double conversions. Now BigDecimal is used when needed.

Also I've made all the changes trying to be 100% compatible with the current interface for setting values but this demanded odd elections at some points. I think that it will be a good idea to discuss what is the expected behaviour when setting values according to columns types, make a guide with it, refactor the code and do a semantic version bump to reflect the "incompatible change" (nothing very dramatic, 98% of users won't notice, specially if you stay safe when passing values to fb). Also there are a few commented assertions that should pass but I think the problem is related to ruby at the 64bit integer boundaries, I'll investigate further but nothing too relevant.

Let me know what you think,

this commit closes #36