Sha256: cc74d02b0b1feab3d5b6ac764860adc2b3ba8948252c1cb8ad557b8dbf83c7d3

Contents?: true

Size: 301 Bytes

Versions: 10

Compression:

Stored size: 301 Bytes

Contents

require 'arel/visitors/to_sql'

module Arel
  module Visitors
    class ToSql
      def visit_Array o
        if last_column.respond_to?(:array) && last_column.array
          quoted o
        else
          o.empty? ? 'NULL' : o.map { |x| visit x }.join(', ')
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
activerecord-postgis-array-0.3.4 lib/activerecord-postgis-array/arel/visitors/to_sql.rb
postgres_ext-2.1.2 lib/postgres_ext/arel/visitors/to_sql.rb
postgres_ext-2.1.1 lib/postgres_ext/arel/visitors/to_sql.rb
postgres_ext-2.1.0 lib/postgres_ext/arel/visitors/to_sql.rb
postgres_ext-2.0.0 lib/postgres_ext/arel/visitors/to_sql.rb
postgres_ext-1.0.0 lib/postgres_ext/arel/visitors/to_sql.rb
postgres_ext-0.4.0 lib/postgres_ext/arel/visitors/to_sql.rb
postgres_ext-0.3.1 lib/postgres_ext/arel/visitors/to_sql.rb
postgres_ext-0.3.0 lib/postgres_ext/arel/visitors/to_sql.rb
postgres_ext-0.2.2 lib/postgres_ext/arel/visitors/to_sql.rb