I'm trying to do something like this (not really, I want to use the type
info instead of just displaying it...):

fields = $db.list_fields(tablename).fetch_fields
fields.each do |field|
  puts "Type = #{field.type} (#{field.type.class})"
end

Result:
Type = 1 (Fixnum)
Type = 253 (Fixnum)
Type = 2 (Fixnum)
Type = 254 (Fixnum)
etc.

How can I translate the first part to something presentable? I cannot
find any information on how to translate the integer values to something
like FLOAT, SMALLINT, TIMESTAMP, etc.

Does anybody have some information about this?
-- 
Posted via http://www.ruby-forum.com/.