edge:Edge为ActiveRecord提供图形功能

时间:2021-05-09 23:03:15
【文件属性】:
文件名称:edge:Edge为ActiveRecord提供图形功能
文件大小:13KB
文件格式:ZIP
更新时间:2021-05-09 23:03:15
Ruby 边缘 Edge使用递归公用表表达式为ActiveRecord提供图功能。 它仅在PostgreSQL上进行了测试,但是它使用Arel生成SQL,因此它可以与支持递归CTE的任何数据库和适配器一起使用。 actions_as_forest使整个树甚至整个树森林都可以在单个查询中加载。 所有的父母和孩子协会都是预先加载的。 安装 将此行添加到您的应用程序的Gemfile中: gem 'edge' 然后执行: $ bundle 或将其自己安装为: $ gem install edge 用法 actions_as_forest添加树/多树功能。 所有它需要一个parent_id列。 可以通过将:foreign_key选项传递给acts_as_forest来覆盖它。 class Location < ActiveRecord::Base acts_as_forest :order =
【文件预览】:
edge-master
----.gitignore(154B)
----Guardfile(255B)
----.rspec(9B)
----gemfiles()
--------5.0.gemfile(84B)
----.travis.yml(209B)
----edge.gemspec(1008B)
----LICENSE(1KB)
----CHANGELOG.md(1KB)
----bench()
--------database_structure.sql(246B)
--------database.yml(72B)
--------benchmark_helper.rb(451B)
--------forest_find.rb(2KB)
----spec()
--------forest_spec.rb(7KB)
--------database_structure.sql(445B)
--------database.yml.travis(91B)
--------database.yml(70B)
--------spec_helper.rb(512B)
----README.md(4KB)
----lib()
--------edge.rb(114B)
--------edge()
----Gemfile(89B)
----Rakefile(292B)

网友评论