Having had no response from my ActiveRecord query, is this the right place to discuss it? Is somewhere else more active? I am having a problem - lots of the code uses (non-ANSI standard) "field NULL" instead of "field IS NULL". I am of the opinion that the abstract adapter should add in a test for this to see which syntax is supported. Thanks Richard PS Personally I would like to rebuild the entire thing using parameter passing instead of long SQL strings, but you can''t have everything. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
On 12/7/06, Richard Vowles <richard.vowles@gmail.com> wrote:> Having had no response from my ActiveRecord query, is this the right place > to discuss it? Is somewhere else more active? > > I am having a problem - lots of the code uses (non-ANSI standard) "field > NULL" instead of "field IS NULL". I am of the opinion that the abstract > adapter should add in a test for this to see which syntax is supported.Send a patch :) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
On 8.12.2006, at 5.23, Richard Vowles wrote:> Having had no response from my ActiveRecord query, is this the > right place to discuss it? Is somewhere else more active? > > I am having a problem - lots of the code uses (non-ANSI standard) > "field = NULL" instead of "field IS NULL". I am of the opinion that > the abstract adapter should add in a test for this to see which > syntax is supported. > > Thanks > Richard > PS Personally I would like to rebuild the entire thing using > parameter passing instead of long SQL strings, but you can''t have > everything.You''re not looking for something like this: Person.find(:all, :conditions => { :last_name => "Catlin", :status => 1 }) Works in trunk and 1.2. It might still have the issue you mention in the beginning, though, so — as Court said— submit a patch with tests ;-) //jarkko -- Jarkko Laine http://jlaine.net http://dotherightthing.com http://www.railsecommerce.com http://odesign.fi
On 08/12/06, Jarkko Laine <jarkko@jlaine.net> wrote:> On 8.12.2006, at 5.23, Richard Vowles wrote:> > I am having a problem - lots of the code uses (non-ANSI standard) > > "field = NULL" instead of "field IS NULL". I am of the opinion that > > the abstract adapter should add in a test for this to see which > > syntax is supported.> You're not looking for something like this: > Person.find(:all, :conditions => { :last_name => "Catlin", :status => > 1 }) > > Works in trunk and 1.2. > > It might still have the issue you mention in the beginning, though, > so — as Court said— submit a patch with tests ;-)Person.find :all, :conditions => {:last_name => nil} Person.find_all_by_last_name(nil) As Jarkko implied, either of these should build queries using IS NULL. If you're not getting this behaviour, open a ticket on dev.rubyonrails.org. Tom --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---