]> source.dussan.org Git - sonarqube.git/blob
05cae114e845ae81de0b6f7fd49e75cfa48520fe
[sonarqube.git] /
1 module ActiveRecord #:nodoc:
2   module ConnectionAdapters #:nodoc:
3     module OracleEnhancedCpk #:nodoc:
4
5       # This mightn't be in Core, but count(distinct x,y) doesn't work for me.
6       # Return that not supported if composite_primary_keys gem is required.
7       def supports_count_distinct? #:nodoc:
8         @supports_count_distinct ||= ! defined?(CompositePrimaryKeys)
9       end
10       
11       def concat(*columns) #:nodoc:
12         "(#{columns.join('||')})"
13       end
14       
15     end
16   end
17 end
18
19 ActiveRecord::ConnectionAdapters::OracleEnhancedAdapter.class_eval do
20   include ActiveRecord::ConnectionAdapters::OracleEnhancedCpk
21 end