I currently have to support both postgres and oracle for work. I''d like to use booleans but I ran into a wall when I found oracle didn''t support them. The fix was really small and I adopted the convention of NUMERIC(1) being boolean. It also uses a similar approach as the mysql driver by allowing it to be disabled if the app doesn''t want to leverage booleans. I bounced the idea off of Michael Schoen but he thinks people might be using NUMERIC(1) for values between 0-9. I can see his point but I think for most the most part people would want to have this option available for consistencies sake. If anyone has any input on this I''d greatly appreciate it, tests/patch/etc at http://dev.rubyonrails.org/ticket/4811 -- Corey Donohoe http://www.atmos.org/
On Apr 26, 2006, at 12:24 PM, Corey Donohoe wrote:> I currently have to support both postgres and oracle for work. I''d > like to use booleans but I ran into a wall when I found oracle didn''t > support them. The fix was really small and I adopted the convention > of NUMERIC(1) being boolean. It also uses a similar approach as the > mysql driver by allowing it to be disabled if the app doesn''t want to > leverage booleans. > > I bounced the idea off of Michael Schoen but he thinks people might be > using NUMERIC(1) for values between 0-9. I can see his point but I > think for most the most part people would want to have this option > available for consistencies sake. > > If anyone has any input on this I''d greatly appreciate it, > tests/patch/etc at http://dev.rubyonrails.org/ticket/4811I think it''s a good idea. You could always provide a flag to turn off the boolean emulation (MySQL adapter does this). -Derrick Spell
Corey Donohoe wrote:> I currently have to support both postgres and oracle for work. I''d > like to use booleans but I ran into a wall when I found oracle didn''t > support them. The fix was really small and I adopted the convention > of NUMERIC(1) being boolean. It also uses a similar approach as the > mysql driver by allowing it to be disabled if the app doesn''t want to > leverage booleans. > > I bounced the idea off of Michael Schoen but he thinks people might be > using NUMERIC(1) for values between 0-9. I can see his point but I > think for most the most part people would want to have this option > available for consistencies sake.I agree. We use NUMERIC(1) for booleans here also and having the ability to decide how to map it would be appreciated. Blair
Corey Donohoe wrote:> I currently have to support both postgres and oracle for work. I''d > like to use booleans but I ran into a wall when I found oracle didn''t > support them. The fix was really small and I adopted the convention > of NUMERIC(1) being boolean. It also uses a similar approach as the > mysql driver by allowing it to be disabled if the app doesn''t want to > leverage booleans. > > I bounced the idea off of Michael Schoen but he thinks people might be > using NUMERIC(1) for values between 0-9. I can see his point but I > think for most the most part people would want to have this option > available for consistencies sake. > > If anyone has any input on this I''d greatly appreciate it, > tests/patch/etc at http://dev.rubyonrails.org/ticket/4811With #emulate_booleans, I''m a fan of this patch. Let me take a closer look and I''ll update my comments on the ticket.
*POKE* Any chance of getting this applied to trunk? Michael have you had the chance to look over this or do you see any reason to keep this from going in? On 4/27/06, Michael A. Schoen <schoenm@earthlink.net> wrote:> > Corey Donohoe wrote: > > I currently have to support both postgres and oracle for work. I''d > > like to use booleans but I ran into a wall when I found oracle didn''t > > support them. The fix was really small and I adopted the convention > > of NUMERIC(1) being boolean. It also uses a similar approach as the > > mysql driver by allowing it to be disabled if the app doesn''t want to > > leverage booleans. > > > > I bounced the idea off of Michael Schoen but he thinks people might be > > using NUMERIC(1) for values between 0-9. I can see his point but I > > think for most the most part people would want to have this option > > available for consistencies sake. > > > > If anyone has any input on this I''d greatly appreciate it, > > tests/patch/etc at http://dev.rubyonrails.org/ticket/4811 > > With #emulate_booleans, I''m a fan of this patch. Let me take a closer > look and I''ll update my comments on the ticket. > _______________________________________________ > Rails-core mailing list > Rails-core@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-core >-- Corey http://www.atmos.org/ _______________________________________________ Rails-core mailing list Rails-core@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-core
Corey Donohoe wrote:> *POKE* > > Any chance of getting this applied to trunk? Michael have you had the > chance to look over this or do you see any reason to keep this from > going in?I''m in the process of combining this patch with another fix. Should have it posted tonight.
Michael A. Schoen wrote:> Corey Donohoe wrote: >> *POKE* >> >> Any chance of getting this applied to trunk? Michael have you had the >> chance to look over this or do you see any reason to keep this from >> going in? > > I''m in the process of combining this patch with another fix. Should have > it posted tonight. >http://dev.rubyonrails.org/ticket/5139