1. Michael Granger
  2. ruby-pg
  3. Issues

Issues

Issue #141 wontfix

Cast Boolean to true/false/nil

Anonymous created an issue

Currently ruby-pg returns "t", "f" or nil for Boolean fields. It would be nice an option to cast them into true, false, nil.

Comments (3)

  1. Lars Kanis

    ActiveRecord is a third API that provides typecasting.

    Well, no one asked for it, but I felt like giving my opinion to the topic: Even if the typecasting feature is something that is requested from time to time, I consider the current API as the best way to go. Data type conversions are never 100% settled, as Jeff Davis sad and can be context dependent. Therefore I would leave it to the higher levels to do type conversions.

  2. Log in to comment