lib/torque/postgresql/adapter/database_statements.rb in torque-postgresql-1.1.8 vs lib/torque/postgresql/adapter/database_statements.rb in torque-postgresql-2.0.0
- old
+ new
@@ -41,20 +41,13 @@
m.register_type 'line', OID::Line.new
m.register_type 'segment', OID::Segment.new
end
# :nodoc:
- if Torque::PostgreSQL::AR521
- def load_additional_types(oids = nil)
- super
- torque_load_additional_types(oids)
- end
- else
- def load_additional_types(type_map, oids = nil)
- super
- torque_load_additional_types(oids)
- end
+ def load_additional_types(oids = nil)
+ super
+ torque_load_additional_types(oids)
end
# Add the composite types to be loaded too.
def torque_load_additional_types(oids = nil)
filter = "AND a.typelem::integer IN (%s)" % oids.join(", ") if oids
@@ -78,14 +71,10 @@
WHERE c.oid = t.typrelid
))
SQL
execute_and_clear(query, 'SCHEMA', []) do |records|
- records.each do |row|
- case row['typtype']
- when 'e' then OID::Enum.create(row, type_map)
- end
- end
+ records.each { |row| OID::Enum.create(row, type_map) }
end
end
# Gets a list of user defined types.
# You can even choose the +category+ filter