Google Groups

Re: [Rails-core] ActiveRecord interface to Arel is awkward, requires find_by_sql(query.to_sql)


Rodrigo Rosenfeld Rosas Jun 4, 2012 6:56 PM
Posted in group: Ruby on Rails: Core
Em 04-06-2012 20:47, Maurizio Casimirri escreveu:
Rodrigo Rosenfeld Rosas:
Lack of documentation, support, and a good-enough API. All of that I've found in Sequel and it further performed better than AR, so yay! ;)

Pretty happy with the move and I sincerely wish the best of luck for AR to get over the "80%" it currently supports...

Allen Madsen:

Squeel (not to be confused with Sequel) does a pretty good job of covering the other 20%.


I can agree that there may be better solutions to replace / complement ActiveRecord but I believe that now is the moment to define a query interface that meets the requirements of our applications, in a way that is not intended to change for a long time and that can be shared between different gems / libraries / ORMs, so that the rest of the implementation can safely change across the time (Arel, Squeel, Sequel or any other brilliant solution that is right for our).

Sorry, but I didn't get it. Sequel shares nothing with AR as far as I can tell you and hasn't significantly changed its interface for years I guess...

For example, Sequel is not likely to support dynamic methods or method_missing for one. You shouldn't expect to find something like record.created_at_changed? in Sequel core, for example, among other "magic" methods, like the now deprecated find_by_xxx dynamic finders.

So, it doesn't rely on AR API and it won't change if AR does.

Did I miss something?

Best,
Rodrigo.