Module: ActiveRecord::ConnectionAdapters::Mysql2SpatialAdapter::ColumnMethods
- Defined in:
- lib/active_record/connection_adapters/mysql2spatial_adapter/column_methods.rb
Instance Method Summary collapse
- #geography(name, options = {}) ⇒ Object
- #geometry(name, options = {}) ⇒ Object
- #geometry_collection(name, options = {}) ⇒ Object
- #line_string(name, options = {}) ⇒ Object
- #multi_line_string(name, options = {}) ⇒ Object
- #multi_point(name, options = {}) ⇒ Object
- #multi_polygon(name, options = {}) ⇒ Object
- #point(name, options = {}) ⇒ Object
- #spatial(name, options = {}) ⇒ Object
Instance Method Details
#geography(name, options = {}) ⇒ Object
10 11 12 |
# File 'lib/active_record/connection_adapters/mysql2spatial_adapter/column_methods.rb', line 10 def geography(name, = {}) column(name, :geography, ) end |
#geometry(name, options = {}) ⇒ Object
14 15 16 |
# File 'lib/active_record/connection_adapters/mysql2spatial_adapter/column_methods.rb', line 14 def geometry(name, = {}) column(name, :geometry, ) end |
#geometry_collection(name, options = {}) ⇒ Object
18 19 20 |
# File 'lib/active_record/connection_adapters/mysql2spatial_adapter/column_methods.rb', line 18 def geometry_collection(name, = {}) column(name, :geometry_collection, ) end |
#line_string(name, options = {}) ⇒ Object
22 23 24 |
# File 'lib/active_record/connection_adapters/mysql2spatial_adapter/column_methods.rb', line 22 def line_string(name, = {}) column(name, :line_string, ) end |
#multi_line_string(name, options = {}) ⇒ Object
26 27 28 |
# File 'lib/active_record/connection_adapters/mysql2spatial_adapter/column_methods.rb', line 26 def multi_line_string(name, = {}) column(name, :multi_line_string, ) end |
#multi_point(name, options = {}) ⇒ Object
30 31 32 |
# File 'lib/active_record/connection_adapters/mysql2spatial_adapter/column_methods.rb', line 30 def multi_point(name, = {}) column(name, :multi_point, ) end |
#multi_polygon(name, options = {}) ⇒ Object
34 35 36 |
# File 'lib/active_record/connection_adapters/mysql2spatial_adapter/column_methods.rb', line 34 def multi_polygon(name, = {}) column(name, :multi_polygon, ) end |
#point(name, options = {}) ⇒ Object
38 39 40 |
# File 'lib/active_record/connection_adapters/mysql2spatial_adapter/column_methods.rb', line 38 def point(name, = {}) column(name, :point, ) end |
#spatial(name, options = {}) ⇒ Object
5 6 7 8 |
# File 'lib/active_record/connection_adapters/mysql2spatial_adapter/column_methods.rb', line 5 def spatial(name, = {}) raise "You must set a type. For example: 't.spatial limit: { type: 'point' }'" unless [:limit][:type] column(name, [:limit][:type], ) end |