I'm a big fan of this change, however I would say this isn't going to replace Datamapper's desperate need for a simple, and straightforward OR syntax with finders.
Dan, have you looked at the syntax proposed by dm-sugar-glider? Maybe something similar would be a good approach for easy OR queries http://github.com/knowtheory/dm-sugar-glider On Oct 30, 2009, at 10:34 AM, Dan Kubb (dkubb) wrote: > > Whoops! Tiny correction on the SQL query examples, they should be: > > Union: > > User.all(:active => true) | User.all(:confirmed => false) > User.all(:active => true) + User.all(:confirmed => false) > # => SELECT * FROM users WHERE active = true OR confirmed = false > > Intersection: > > User.all(:active => true) & User.all(:confirmed => false) > # => SELECT * FROM users WHERE active = true AND confirmed = false > > Difference: > > User.all(:active => true) - User.all(:confirmed => false) > # => SELECT * FROM users WHERE active = true AND NOT(confirmed = > false) > > That's what I get for cutting and pasting ;) > > -- > > Dan > (dkubb) > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "DataMapper" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/datamapper?hl=en -~----------~----~----~----~------~----~------~--~---
