Flowdock
method

run

Importance_0
v5.2.3 - 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 17
          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".freeze }
            enums, nodes = nodes.partition { |row| row["typtype"] == "e".freeze }
            domains, nodes = nodes.partition { |row| row["typtype"] == "d".freeze }
            arrays, nodes = nodes.partition { |row| row["typinput"] == "array_in".freeze }
            composites, nodes = nodes.partition { |row| row["typelem"].to_i != 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.