Module: ActiveRecord::ConnectionAdapters::Mysql2Rgeo::ColumnMethods
- Included in:
- TableDefinition
- Defined in:
- lib/active_record/connection_adapters/mysql2rgeo/column_methods.rb
Instance Method Summary collapse
- #geometry(name, options = {}) ⇒ Object
- #geometry_collection(name, options = {}) ⇒ Object (also: #geometrycollection)
- #line_string(name, options = {}) ⇒ Object (also: #linestring)
- #multi_line_string(name, options = {}) ⇒ Object (also: #multilinestring)
- #multi_point(name, options = {}) ⇒ Object (also: #multipoint)
- #multi_polygon(name, options = {}) ⇒ Object (also: #multipolygon)
- #point(name, options = {}) ⇒ Object
- #polygon(name, options = {}) ⇒ Object
- #spatial(name, options = {}) ⇒ Object
Instance Method Details
#geometry(name, options = {}) ⇒ Object
13 14 15 |
# File 'lib/active_record/connection_adapters/mysql2rgeo/column_methods.rb', line 13 def geometry(name, = {}) column(name, :geometry, **) end |
#geometry_collection(name, options = {}) ⇒ Object Also known as: geometrycollection
17 18 19 |
# File 'lib/active_record/connection_adapters/mysql2rgeo/column_methods.rb', line 17 def geometry_collection(name, = {}) column(name, :geometrycollection, **) end |
#line_string(name, options = {}) ⇒ Object Also known as: linestring
22 23 24 |
# File 'lib/active_record/connection_adapters/mysql2rgeo/column_methods.rb', line 22 def line_string(name, = {}) column(name, :linestring, **) end |
#multi_line_string(name, options = {}) ⇒ Object Also known as: multilinestring
27 28 29 |
# File 'lib/active_record/connection_adapters/mysql2rgeo/column_methods.rb', line 27 def multi_line_string(name, = {}) column(name, :multilinestring, **) end |
#multi_point(name, options = {}) ⇒ Object Also known as: multipoint
32 33 34 |
# File 'lib/active_record/connection_adapters/mysql2rgeo/column_methods.rb', line 32 def multi_point(name, = {}) column(name, :multipoint, **) end |
#multi_polygon(name, options = {}) ⇒ Object Also known as: multipolygon
37 38 39 |
# File 'lib/active_record/connection_adapters/mysql2rgeo/column_methods.rb', line 37 def multi_polygon(name, = {}) column(name, :multipolygon, **) end |
#point(name, options = {}) ⇒ Object
42 43 44 |
# File 'lib/active_record/connection_adapters/mysql2rgeo/column_methods.rb', line 42 def point(name, = {}) column(name, :point, **) end |
#polygon(name, options = {}) ⇒ Object
46 47 48 |
# File 'lib/active_record/connection_adapters/mysql2rgeo/column_methods.rb', line 46 def polygon(name, = {}) column(name, :polygon, **) end |
#spatial(name, options = {}) ⇒ Object
7 8 9 10 11 |
# File 'lib/active_record/connection_adapters/mysql2rgeo/column_methods.rb', line 7 def spatial(name, = {}) raise "You must set a type. For example: 't.spatial type: :st_point'" unless [:type] column(name, [:type], **) end |