aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/engines/sql/core_extensions/array.rb
blob: 80041cb5f34bf70d639f38edff7f518b76271505 (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