aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/engines/sql/extensions/array.rb
blob: 7f15179721261c7b17a14ee75a6673725aab0c3e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
module Arel
  module Sql
    module ArrayExtensions
      def to_sql(formatter = nil)
        "(" + collect { |e| e.to_sql(formatter) }.join(', ') + ")"
      end

      def inclusion_predicate_sql
        "IN"
      end
      
      Array.send(:include, self)
    end
  end
end