Class: Arel::Visitors::MySQL2Spatial
- Inherits:
-
MySQL
- Object
- MySQL
- Arel::Visitors::MySQL2Spatial
- Includes:
- BindVisitor, RGeo::ActiveRecord::SpatialToSql
- Defined in:
- lib/active_record/connection_adapters/mysql2spatial_adapter/arel_tosql.rb
Constant Summary collapse
- FUNC_MAP =
{ 'st_wkttosql' => 'GeomFromText', 'st_wkbtosql' => 'GeomFromWKB', 'st_length' => 'GLength', }
Instance Method Summary collapse
Instance Method Details
#st_func(standard_name_) ⇒ Object
51 52 53 54 55 56 57 58 59 |
# File 'lib/active_record/connection_adapters/mysql2spatial_adapter/arel_tosql.rb', line 51 def st_func(standard_name_) if (name_ = FUNC_MAP[standard_name_.downcase]) name_ elsif standard_name_ =~ /^st_(\w+)$/i $1 else standard_name_ end end |