Flowdock
method

run

Importance_0
v4.2.1 - Show latest stable - 0 notes - Class: TypeMapInitializer
run(records) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/connection_adapters/postgresql/oid/type_map_initializer.rb, line 15
          def run(records)
            nodes = records.reject { |row| @store.key? row['oid'].to_i }
            mapped, nodes = nodes.partition { |row| @store.key? row['typname'] }
            ranges, nodes = nodes.partition { |row| row['typtype'] == 'r' }
            enums, nodes = nodes.partition { |row| row['typtype'] == 'e' }
            domains, nodes = nodes.partition { |row| row['typtype'] == 'd' }
            arrays, nodes = nodes.partition { |row| row['typinput'] == 'array_in' }
            composites, nodes = nodes.partition { |row| row['typelem'] != '0' }

            mapped.each     { |row| register_mapped_type(row)    }
            enums.each      { |row| register_enum_type(row)      }
            domains.each    { |row| register_domain_type(row)    }
            arrays.each     { |row| register_array_type(row)     }
            ranges.each     { |row| register_range_type(row)     }
            composites.each { |row| register_composite_type(row) }
          end
Register or log in to add new notes.