title: SQL column type from Arel::Attributes::Attribute object
body: <p><strong>tl;dr</strong> Given an <code>Arel::Attributes::Attribue</code> object, say <code>Model.arel_table[:created_at]</code> how do get it's SQL type?</p>
  
  <p><strong>Context:</strong> I'm bypassing the ActiveRecord infrastructure in favour of Arel to write some SQL reports that need to be generated really efficiently. Using Arel's <code>to_sql</code> method I'm generating the final SQL and executing it directly via <code>ActiveRecord::Base.connection.execute</code>. However, I need to apply SQL transformations to certain columns (eg. change timezone of timestamps stored in GMT). Since the number of columns is large (and varying, based on user input), I don't want to hard code these transformations.  I'd like to look at the SQL type of the columns being selected and apply the transformation accordingly.</p>