]> git.openstreetmap.org Git - rails.git/blob
1ab47179fee9ae90ab264769522c362707b5df87
[rails.git] /
1 module ActiveRecord
2   module ConnectionAdapters
3     class IBM_DBAdapter < AbstractAdapter
4       
5       # This mightn't be in Core, but count(distinct x,y) doesn't work for me
6       def supports_count_distinct? #:nodoc:
7         false
8       end
9       
10       alias_method :quote_original, :quote
11       def quote(value, column = nil)
12         if value.kind_of?(String) && column && [:integer, :float].include?(column.type)
13               value = column.type == :integer ? value.to_i : value.to_f
14               value.to_s
15         else
16             quote_original(value, column)
17         end
18       end
19     end
20   end
21 end