【文件属性】:
文件名称:armg:将 MySQL 几何类型添加到 Active Record
文件大小:18KB
文件格式:ZIP
更新时间:2021-05-31 10:57:14
mysql ruby rails activerecord geometry
阿姆格
将 MySQL 几何类型添加到 Active Record。
安装
将此行添加到应用程序的 Gemfile 中:
gem 'armg'
然后执行:
$ bundle
或者自己安装:
$ gem install armg
用法
require 'active_record'
require 'armg'
ActiveRecord :: Base . establish_connection ( adapter : 'mysql2' , database : 'my_db' )
ActiveRecord :: Migration . create_table :geoms , options : 'ENGINE=MyISAM' do | t |
t . geometry 'location' , null : false
t . index [ 'locatio
【文件预览】:
armg-master
----gemfiles()
--------ar52.gemfile(123B)
--------ar61.gemfile(123B)
--------.bundle()
--------ar51.gemfile(123B)
--------ar50.gemfile(123B)
--------ar60.gemfile(123B)
----.github()
--------workflows()
----LICENSE.txt(1KB)
----lib()
--------armg()
--------armg.rb(983B)
----Gemfile(120B)
----spec()
--------mysql_helper.rb(2KB)
--------utils_spec.rb(598B)
--------spec_helper.rb(797B)
--------wkt_spec.rb(1001B)
--------armg_spec.rb(4KB)
--------migration_spec.rb(2KB)
----Rakefile(258B)
----README.md(4KB)
----.rubocop.yml(525B)
----armg.gemspec(1KB)
----Appraisals(315B)
----.rspec(30B)
----docker-compose.yml(263B)
----.gitignore(154B)
----bin()
--------console(369B)
--------setup(131B)