【问题标题】:how do I save this data structure in the database?如何将这个数据结构保存在数据库中?
【发布时间】:2015-05-04 16:54:56
【问题描述】:

如何将这个数据结构保存在数据库中?

{
  amount => [{year => total_cost}],
  amount => [{year => total_cost}],
  amount => [{year => total_cost}]
}

【问题讨论】:

标签: ruby-on-rails ruby-on-rails-4


【解决方案1】:

查看PostgreSQL's hstore 功能。它就是为这种情况而设计的。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-10-05
    • 1970-01-01
    • 1970-01-01
    • 2010-12-01
    • 2012-03-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多