4 ms·
I observe how this post creates the wish in me to say hurtful things to the author. Active Record is a powerful pattern - for it's usecase. You use it to build
by febeling 7y ago
I observe how this post creates the wish in me to say hurtful things to the author.
Active Record is a powerful pattern - for it's usecase. You use it to build applications to find, create, update and delete objects. It's not useful for complex queries, aggregations, graph applications, NLP, mathematical analysis, or any other use case it's not meant to solve. No surprise there.
The ruby package of the same name includes quite a few things that support complex queries and aggregation, and that way it goes beyond the pattern which it is named for (including all of the examples that are presented as the better alternative solution). For requirements that are best solved by dropping to SQL you can bypass the records machinery entirely, in marked difference to some other ORMs which try to completely hide and monopolise DB access.