Class: ActiveRecord::ConnectionAdapters::OracleTableDefinition
- Inherits:
-
TableDefinition
- Object
- TableDefinition
- ActiveRecord::ConnectionAdapters::OracleTableDefinition
- Defined in:
- lib/spatial_adapter/oracle_enhanced.rb
Instance Attribute Summary collapse
-
#geom_columns ⇒ Object
readonly
Returns the value of attribute geom_columns.
Instance Method Summary collapse
Instance Attribute Details
#geom_columns ⇒ Object (readonly)
Returns the value of attribute geom_columns.
293 294 295 |
# File 'lib/spatial_adapter/oracle_enhanced.rb', line 293 def geom_columns @geom_columns end |
Instance Method Details
#column(name, type, options = {}) ⇒ Object
295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 |
# File 'lib/spatial_adapter/oracle_enhanced.rb', line 295 def column(name, type, = {}) unless @base.geometry_data_types[type.to_sym].nil? geom_column = OracleColumnDefinition.new(@base, name, type) geom_column.null = [:null] srid = [:srid] || -1 srid = @base.default_srid if srid == :default_srid geom_column.srid = srid geom_column.with_z = [:with_z] || false geom_column.with_m = [:with_m] || false @geom_columns = [] if @geom_columns.nil? @geom_columns << geom_column else super(name,type,) end end |