Permalink
Browse files

mapping more oids

  • Loading branch information...
1 parent 15b0dcd commit 94540763141a3574b9c2a96abfdcb3be601424a5 @tenderlove tenderlove committed Feb 2, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 activerecord/lib/active_record/connection_adapters/postgresql/oid.rb
@@ -68,7 +68,7 @@ def type_cast(value)
class Boolean
def type_cast(value)
- value == 't'
+ ConnectionAdapters::Column.value_to_boolean value
end
end
@@ -139,6 +139,12 @@ def type_cast(value)
TYPE_MAP[1009] = OID::Vector.new(',', TYPE_MAP[25]) # _text
TYPE_MAP[1007] = OID::Vector.new(',', TYPE_MAP[23]) # _int4
+ TYPE_MAP[600] = OID::Vector.new(',', TYPE_MAP[701]) # point
+ TYPE_MAP[601] = OID::Vector.new(',', TYPE_MAP[600]) # lseg
+ TYPE_MAP[602] = OID::Identity.new # path
+ TYPE_MAP[603] = OID::Vector.new(';', TYPE_MAP[600]) # box
+ TYPE_MAP[604] = OID::Identity.new # polygon
+ TYPE_MAP[718] = OID::Identity.new # circle
end
end
end

0 comments on commit 9454076

Please sign in to comment.