# File lib/active_record/connection_adapters/mysql_adapter.rb, line 388 def self.alias_type(new, old) TYPES[new] = TYPES[old] end
# File lib/active_record/connection_adapters/mysql_adapter.rb, line 392 def self.find_type(field) if field.type == Mysql::Field::TYPE_TINY && field.length > 1 TYPES[Mysql::Field::TYPE_LONG] else TYPES.fetch(field.type) { Fields::Identity.new } end end
Register an MySQL type_id
with a typecasting object in
type
.
# File lib/active_record/connection_adapters/mysql_adapter.rb, line 384 def self.register_type(type_id, type) TYPES[type_id] = type end