title: Getting typed results from ActiveRecord raw SQL
body: <p>In Sequel, I can do:</p>
  
  <pre><code>irb(main):003:0&gt; DB["select false"].get
  =&gt; false
  </code></pre>
  
  <p>Which returns a false boolean.  I'd like to be able to do something similar in ActiveRecord:</p>
  
  <pre><code>irb(main):007:0&gt; ActiveRecord::Base.connection.select_value "select false"
  =&gt; "f"
  </code></pre>
  
  <p>As you can see, it returns the string <code>"f"</code>. Is there a way to get a false boolean with ActiveRecord? (Similarly, I might be calling a function that returns a timestamptz, an array, etc -- I'd want the returned value to have the correct type)</p>
  
  <p>My use case: I'm calling a database function, want to get back a typed result instead of a string.</p>