Mike,
Your example sounds more like a kind of object query language.
Rick,
Lafcadio, ez_where and the Criteria Library don't really make queries
as transparent as filtering a Ruby array. Lafcadio seems to be closest
to that though.
I'm aiming for something like
Product.all[10..99].sort_by(:name).sort_by(:price).reverse.select { |p| ... }
And saving and deleting should be as simple as doing
Product.all << Product.new
and
Product.all.delete(some_product)
Erik
On 01/07/07, Rick Olson <[EMAIL PROTECTED]> wrote:
>
> Here are some good links to get started.
>
> http://brainspl.at/articles/2006/01/30/i-have-been-busy
> http://onestepback.org/index.cgi/Tech/Ruby/Criteria.rdoc
> http://lafcadio.rubyforge.org/manual.html#id801866
>
> I'm not really sure rails-core is the right place to discuss it.
> Something like this would probably need a solid implementation for AR
> that everyone likes before we can think about committing it to rails.
> Something like the #all method should be easy to do as a plugin.
>
> I've written stuff like this in python, but I feel that it's just not
> worth the effort for the more complex queries. ez_where is pretty
> cool, but I only use it in very rare instances. That's just my 2
> cents I guess...
>
> --
> Rick Olson
> http://lighthouseapp.com
> http://weblog.techno-weenie.net
> http://mephistoblog.com
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---