本文介绍了Rails ORM是否会限制执行聚合的能力?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我担心Rails是否可以处理金融应用程序所需的复杂聚合类型,尤其是ORM是否可以有效地处理这些聚合.在我正在考虑将其用于此用途的财务应用程序中,需要进行大量报告,以各种方式汇总详细的财务数据.没有Rails ORM的支持,我将需要编写直接SQL.但是我担心,一旦开始,Rails的其他部分可能无法正常工作,结果我可能最终会大部分使用Rails来路由其路由,而很少使用其他方法.这是一个有效的担忧,还是我不必要地担心?

I am concerned whether Rails can handle the types of complex aggregations that are needed for a financial application and particularly whether the ORM can handle these effectively.In a financial application that I am thinking of using this for, there is a need to do lots of reporting of detailed financial data, aggregated in various ways. Without support in the Rails ORM, I would need to write direct SQL. But I am concerned that once I start this, other parts of Rails may not work as well and that as a result I may end up mostly using Rails for its routes and very little else. Is this a valid concern or am I worrying needlessly?

推荐答案

ActiveRecord的限制是我在科学环境中使用Rails遇到麻烦的原因之一.您可能想看看替代的Ruby ORM,它使使用遗留数据库的工作更加轻松:

Limitations of ActiveRecord are one of the reasons I had trouble using Rails in a scientific environment. You might want to check out alternative Ruby ORM's that make it a bit easier to work with a legacy database:

  • Sequel
  • DataMapper

最终,尽管ORM的设计使您远离了SQL,所以很可能它们都不适合.

Ultimately though ORM's by design take you away from SQL so it's possible that none of them are a good fit.

这篇关于Rails ORM是否会限制执行聚合的能力?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 12:05