Jacques, > 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.
I agree. The main reason for introducing this is that it fits in with the Collection API naturally, and provides primitive logic that we can build even better APIs on top of easily. > Dan, have you looked at the syntax proposed by dm-sugar-glider? Maybe > something similar would be a good approach for easy OR > querieshttp://github.com/knowtheory/dm-sugar-glider This actually is inspired somewhat by the Sugar Glider project that Ted (knowtheory) is working on. To make things easier for that project, I was speccing the Query conditions API, and realized that it might make it easier if there was a simple way to combine new conditions with existing conditions. If we think of a Query as a Set, and provide the standard union/intersection/difference methods it makes this alot easier. Then I thought: what if I expose this through the Collection? Set operations are *already* available on Collection, they just lazy load and are totally inefficient -- what if I make it so they don't lazy load and simply combine the conditions together? That's how this idea was born. The Sugar Glider project is more of an experimental query interface that when complete, I would like everyone to try, and if it proves useful we can talk about merging it into the core. It provides similar capabilities to my dm-ambition gem (which is awesome if you're running on 1.8), but it will have no dependency on ParseTree, so should work equally well with 1.8, 1.9 and JRuby. -- Dan (dkubb) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "DataMapper" group. To post to this group, send email to datamapper@googlegroups.com To unsubscribe from this group, send email to datamapper+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/datamapper?hl=en -~----------~----~----~----~------~----~------~--~---