Class: PgFuncall::AR42TypeMap

Inherits:
TypeMap
  • Object
show all
Defined in:
lib/pg_funcall/type_map.rb

Constant Summary

Constants inherited from TypeMap

TypeMap::FMETAQUERY

Instance Method Summary collapse

Methods inherited from TypeMap

#_canonicalize_type_name, #ar_connection, fetch, #function_types, #initialize, #load_types, #oid_for_type, #pg_connection, #resolve

Constructor Details

This class inherits a constructor from PgFuncall::TypeMap

Instance Method Details

#lookup_ar_by_name(name) ⇒ Object



185
186
187
# File 'lib/pg_funcall/type_map.rb', line 185

def lookup_ar_by_name(name)
  @ar_connection.instance_variable_get("@type_map").lookup(name)
end

#lookup_ar_by_oid(oid) ⇒ Object



189
190
191
# File 'lib/pg_funcall/type_map.rb', line 189

def lookup_ar_by_oid(oid)
  @ar_connection.instance_variable_get("@type_map").lookup(oid)
end

#type_cast_from_database(value, type) ⇒ Object



193
194
195
# File 'lib/pg_funcall/type_map.rb', line 193

def type_cast_from_database(value, type)
  type.ar_type.type_cast_from_database(value)
end