lib/mini_sql/coders.rb in mini_sql-0.1.2 vs lib/mini_sql/coders.rb in mini_sql-0.1.3
- old
+ new
@@ -1,9 +1,9 @@
module MiniSql
module Coders
class NumericCoder < PG::SimpleDecoder
def decode(string, tuple = nil, field = nil)
- string.to_f
+ BigDecimal.new(string)
end
end
class IPAddrCoder < PG::SimpleDecoder
def decode(string, tuple = nil, field = nil)
IPAddr.new(string)