Sha256: a640ab09b3b630acecc8f4416a68f2370af2e26066f845ac5cf932bd92056a5b

Contents?: true

Size: 398 Bytes

Versions: 5

Compression:

Stored size: 398 Bytes

Contents

module Arel
  module Sql
    module ArrayExtensions
      def to_sql(formatter = nil)
        if any?
          "(" + collect { |e| e.to_sql(formatter) }.join(', ') + ")"
        else
          "(NULL)"
        end
      end

      def inclusion_predicate_sql
        "IN"
      end

      def exclusion_predicate_sql
        "NOT IN"
      end

      Array.send(:include, self)
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
arel-1.0.1 lib/arel/engines/sql/core_extensions/array.rb
arel-1.0.0 lib/arel/engines/sql/core_extensions/array.rb
arel-1.0.0.rc1 lib/arel/engines/sql/core_extensions/array.rb
arel-compat-0.4.0 lib/arel/engines/sql/core_extensions/array.rb
arel-0.4.0 lib/arel/engines/sql/core_extensions/array.rb