class ActiveRecord::ConnectionAdapters::PostgreSQL::OID::TypeMapInitializer

Public Instance Methods

query_conditions_for_initial_load(type_map) click to toggle source
# File lib/active_record/connection_adapters/redshift_adapter.rb, line 53
          def query_conditions_for_initial_load(type_map)
            known_type_names = type_map.keys.map { |n| "'#{n}'" }
            known_type_types = %w('r' 'e' 'd')
            <<-SQL % [known_type_names.join(", "), known_type_types.join(", ")]
              WHERE
                t.typname IN (%s)
                OR t.typtype IN (%s)
                OR t.typinput = 'array_in'::regproc
                OR t.typelem != 0
            SQL
          end