groupdate:对时态数据进行分组的最简单方法-源码

上传者: 42131316 | 上传时间: 2021-02-27 21:02:37 | 文件大小: 39KB | 文件类型: ZIP
分组日期 最简单的分组方式: 天 星期 一天中的小时 以及更多(下面的完整列表) :party_popper: 支持时区-包括夏令时! 最好的部分 :shortcake: 获得整个系列-另一个最好的部分 支持PostgreSQL,MySQL和Redshift,以及数组和哈希(以及对有限支持) :heart_with_arrow: 与 安装 将此行添加到您的应用程序的Gemfile中: gem 'groupdate' 对于MySQL和SQLite,还请遵循。 入门 User . group_by_day ( :created_at ) . count # { # Sat, 24 May 2020 => 50, # Sun, 25 May 2020 => 100, # Mon, 26 May 2020 => 34 # } 默认情况下,结果按升序返回,因此无需排序。 您可以按以下方式分组: 第二 分钟 小时 天 星期 月 四分之一 年 和 分

文件下载

资源详情

[{"title":"( 44 个子文件 39KB ) groupdate:对时态数据进行分组的最简单方法-源码","children":[{"title":"groupdate-master","children":[{"title":"gemfiles","children":[{"title":"activerecord51.gemfile <span style='color:#111;'> 144B </span>","children":null,"spread":false},{"title":"activerecord60.gemfile <span style='color:#111;'> 144B </span>","children":null,"spread":false},{"title":"activerecord52.gemfile <span style='color:#111;'> 144B </span>","children":null,"spread":false},{"title":"activerecord50.gemfile <span style='color:#111;'> 156B </span>","children":null,"spread":false},{"title":"redshift.gemfile <span style='color:#111;'> 145B </span>","children":null,"spread":false}],"spread":true},{"title":".github","children":[{"title":"ISSUE_TEMPLATE.md <span style='color:#111;'> 146B </span>","children":null,"spread":false},{"title":"workflows","children":[{"title":"build.yml <span style='color:#111;'> 1013B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"LICENSE.txt <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false},{"title":"lib","children":[{"title":"groupdate","children":[{"title":"magic.rb <span style='color:#111;'> 7.13KB </span>","children":null,"spread":false},{"title":"relation.rb <span style='color:#111;'> 357B </span>","children":null,"spread":false},{"title":"adapters","children":[{"title":"postgresql_adapter.rb <span style='color:#111;'> 2.03KB </span>","children":null,"spread":false},{"title":"mysql_adapter.rb <span style='color:#111;'> 2.29KB </span>","children":null,"spread":false},{"title":"sqlite_adapter.rb <span style='color:#111;'> 1.59KB </span>","children":null,"spread":false},{"title":"base_adapter.rb <span style='color:#111;'> 2.29KB </span>","children":null,"spread":false},{"title":"redshift_adapter.rb <span style='color:#111;'> 1.94KB </span>","children":null,"spread":false}],"spread":true},{"title":"query_methods.rb <span style='color:#111;'> 488B </span>","children":null,"spread":false},{"title":"active_record.rb <span style='color:#111;'> 191B </span>","children":null,"spread":false},{"title":"series_builder.rb <span style='color:#111;'> 10.32KB </span>","children":null,"spread":false},{"title":"enumerable.rb <span style='color:#111;'> 941B </span>","children":null,"spread":false},{"title":"version.rb <span style='color:#111;'> 41B </span>","children":null,"spread":false}],"spread":true},{"title":"groupdate.rb <span style='color:#111;'> 1.68KB </span>","children":null,"spread":false}],"spread":true},{"title":"Gemfile <span style='color:#111;'> 165B </span>","children":null,"spread":false},{"title":"Rakefile <span style='color:#111;'> 1.41KB </span>","children":null,"spread":false},{"title":"CONTRIBUTING.md <span style='color:#111;'> 1.93KB </span>","children":null,"spread":false},{"title":"test","children":[{"title":"test_helper.rb <span style='color:#111;'> 4.08KB </span>","children":null,"spread":false},{"title":"permit_test.rb <span style='color:#111;'> 949B </span>","children":null,"spread":false},{"title":"week_start_test.rb <span style='color:#111;'> 2.72KB </span>","children":null,"spread":false},{"title":"adapters","children":[{"title":"postgresql.rb <span style='color:#111;'> 90B </span>","children":null,"spread":false},{"title":"redshift.rb <span style='color:#111;'> 67B </span>","children":null,"spread":false},{"title":"mysql.rb <span style='color:#111;'> 86B </span>","children":null,"spread":false},{"title":"enumerable.rb <span style='color:#111;'> 13B </span>","children":null,"spread":false},{"title":"sqlite.rb <span style='color:#111;'> 81B </span>","children":null,"spread":false}],"spread":true},{"title":"enumerable_test.rb <span style='color:#111;'> 1.87KB </span>","children":null,"spread":false},{"title":"zeros_test.rb <span style='color:#111;'> 6.22KB </span>","children":null,"spread":false},{"title":"multiple_group_test.rb <span style='color:#111;'> 2.38KB </span>","children":null,"spread":false},{"title":"day_start_test.rb <span style='color:#111;'> 8.25KB </span>","children":null,"spread":false},{"title":"database_test.rb <span style='color:#111;'> 9.92KB </span>","children":null,"spread":false},{"title":"basic_test.rb <span style='color:#111;'> 12.98KB </span>","children":null,"spread":false},{"title":"support","children":[{"title":"activerecord.rb <span style='color:#111;'> 1.41KB </span>","children":null,"spread":false}],"spread":false},{"title":"format_test.rb <span style='color:#111;'> 2.22KB </span>","children":null,"spread":false}],"spread":false},{"title":"README.md <span style='color:#111;'> 6.35KB </span>","children":null,"spread":false},{"title":".gitignore <span style='color:#111;'> 175B </span>","children":null,"spread":false},{"title":"CHANGELOG.md <span style='color:#111;'> 5.60KB </span>","children":null,"spread":false},{"title":"groupdate.gemspec <span style='color:#111;'> 565B </span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明